public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/personal-branch)] only +-1
@ 2021-06-14  3:28 Jiu Fu Guo
  0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2021-06-14  3:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0c0e2a8eb33119e7f92dc18a7070b039467f72f1

commit 0c0e2a8eb33119e7f92dc18a7070b039467f72f1
Author: Jiufu Guo <guojiufu@linux.ibm.com>
Date:   Mon Jun 14 11:27:46 2021 +0800

    only +-1

Diff:
---
 gcc/testsuite/gcc.dg/loop-split1.c | 2 +-
 gcc/tree-ssa-loop-split.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/loop-split1.c b/gcc/testsuite/gcc.dg/loop-split1.c
index 0276b58d90a..be8ea071371 100644
--- a/gcc/testsuite/gcc.dg/loop-split1.c
+++ b/gcc/testsuite/gcc.dg/loop-split1.c
@@ -155,4 +155,4 @@ find_skip_diff (char *p, char *q, unsigned n, unsigned i)
   return i;
 }
 
-/* { dg-final { scan-tree-dump-times "Loop split" 11 "lsplit" } } */
+/* { dg-final { scan-tree-dump-times "Loop split" 13 "lsplit" } } */
diff --git a/gcc/tree-ssa-loop-split.c b/gcc/tree-ssa-loop-split.c
index 9b4770736c9..b247afd51a1 100644
--- a/gcc/tree-ssa-loop-split.c
+++ b/gcc/tree-ssa-loop-split.c
@@ -1728,7 +1728,7 @@ analyze_idx_elements (class loop *loop, edge e, idx_elements &data)
   if (rhs_code != PLUS_EXPR)
     return false;
   tree step = gimple_assign_rhs2 (stmt);
-  if (TREE_CODE (step) != INTEGER_CST)
+  if (!integer_minus_onep (step) && !integer_onep (step))
     return false;
   inc_stmt = stmt;
   tree prev = gimple_assign_rhs1 (stmt);


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

only message in thread, other threads:[~2021-06-14  3:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14  3:28 [gcc(refs/users/guojiufu/heads/personal-branch)] only +-1 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).