public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/101173] [9/10/11 Regression] wrong code at -O3 on x86_64-linux-gnu
Date: Thu, 01 Jul 2021 10:53:53 +0000	[thread overview]
Message-ID: <bug-101173-4-dU3QuKtH9K@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101173-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101173

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
In the light of PR101280 I am now testing the following alternate fix for the
original problem, avoiding this regression:

diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc
index 43045c5455e..43ef112a2d0 100644
--- a/gcc/gimple-loop-interchange.cc
+++ b/gcc/gimple-loop-interchange.cc
@@ -1043,8 +1043,11 @@ tree_loop_interchange::valid_data_dependences (unsigned
i_idx, unsigned o_idx,
            continue;

          /* Be conservative, skip case if either direction at i_idx/o_idx
-            levels is not '=' (for the inner loop) or '<'.  */
-         if (dist_vect[i_idx] < 0 || dist_vect[o_idx] <= 0)
+            levels is not '=' or '<'.  */
+         if (dist_vect[i_idx] < 0
+             || (DDR_REVERSED_P (ddr) && dist_vect[i_idx] > 0)
+             || dist_vect[o_idx] < 0
+             || (DDR_REVERSED_P (ddr) && dist_vect[o_idx] > 0))
            return false;
        }
     }

  parent reply	other threads:[~2021-07-01 10:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  2:34 [Bug tree-optimization/101173] New: " qrzhang at gatech dot edu
2021-06-23  2:35 ` [Bug tree-optimization/101173] " qrzhang at gatech dot edu
2021-06-23  6:45 ` [Bug tree-optimization/101173] [9/10/11/12 Regression] " rguenth at gcc dot gnu.org
2021-06-23  7:09 ` rguenth at gcc dot gnu.org
2021-06-23  8:03 ` rguenth at gcc dot gnu.org
2021-06-24  1:53 ` amker at gcc dot gnu.org
2021-06-24  7:08 ` rguenth at gcc dot gnu.org
2021-06-28  6:33 ` cvs-commit at gcc dot gnu.org
2021-06-28  6:34 ` [Bug tree-optimization/101173] [9/10/11 " rguenth at gcc dot gnu.org
2021-07-01 10:53 ` rguenth at gcc dot gnu.org [this message]
2021-07-01 11:39 ` cvs-commit at gcc dot gnu.org
2021-07-01 12:19 ` rguenth at gcc dot gnu.org
2021-07-02  6:54 ` cvs-commit at gcc dot gnu.org
2021-07-07 14:07 ` cvs-commit at gcc dot gnu.org
2021-09-06 10:18 ` [Bug tree-optimization/101173] [9/10 " cvs-commit at gcc dot gnu.org
2021-10-13 10:09 ` [Bug tree-optimization/101173] [9 " cvs-commit at gcc dot gnu.org
2021-10-13 10:09 ` rguenth at gcc dot gnu.org

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=bug-101173-4-dU3QuKtH9K@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).