public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jiu Fu Guo <guojiufu@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/guojiufu/heads/personal-branch)] only +-1
Date: Mon, 14 Jun 2021 03:28:18 +0000 (GMT)	[thread overview]
Message-ID: <20210614032818.B87673835811@sourceware.org> (raw)

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);


                 reply	other threads:[~2021-06-14  3:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210614032818.B87673835811@sourceware.org \
    --to=guojiufu@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).