public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/personal-branch)] update the lhs of inc_stmt, instead update the next of orig phi.
@ 2021-06-09  5:25 Jiu Fu Guo
  0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2021-06-09  5:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b2b3332a54f06aebd9e13679c5bd29ef3344899a

commit b2b3332a54f06aebd9e13679c5bd29ef3344899a
Author: Jiufu Guo <guojiufu@linux.ibm.com>
Date:   Wed Jun 9 13:24:54 2021 +0800

    update the lhs of inc_stmt, instead update the next of orig phi.

Diff:
---
 gcc/tree-ssa-loop-split.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gcc/tree-ssa-loop-split.c b/gcc/tree-ssa-loop-split.c
index e01d44a6b28..688d26aecaf 100644
--- a/gcc/tree-ssa-loop-split.c
+++ b/gcc/tree-ssa-loop-split.c
@@ -1642,16 +1642,15 @@ struct idx_elements
 {
   gcond *gc;
   gphi *phi;
+  gimple *inc_stmt;
   tree idx;
   tree bnd;
-  tree next;
   tree large_type;
   tree small_type;
-  gimple *inc_stmt;
   bool cmp_on_next;
 };
 
-/*  Analyze and get the idx related elements: bnd, next,
+/*  Analyze and get the idx related elements: bnd,
     phi, increase stmt from exit edge E, etc.
 
     i = phi (b, n)
@@ -1741,7 +1740,6 @@ analyze_idx_elements (class loop *loop, edge e, idx_elements &data)
   data.phi = phi;
   data.idx = idx;
   data.bnd = bnd;
-  data.next = next;
   data.large_type = large_type;
   data.small_type = small_type;
   data.inc_stmt = inc_stmt;
@@ -1887,7 +1885,7 @@ update_idx_bnd_type (class loop *loop, idx_elements &data)
 
   /* next = (next type)new_next
      And remove next = prev + 1.  */
-  tree next = data.next;
+  tree next = gimple_assign_lhs (inc_stmt); 
   tree type = TREE_TYPE (next);
   gimple *stmt = gimple_build_assign (next, fold_convert (type, new_next));
   gsi = gsi_for_stmt (inc_stmt);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09  5:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  5:25 [gcc(refs/users/guojiufu/heads/personal-branch)] update the lhs of inc_stmt, instead update the next of orig phi Jiu Fu Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).