public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dorit at il dot ibm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/30858] [4.3 Regression] ice for legal code with -O2 -ftree-vectorize
Date: Mon, 19 Feb 2007 14:12:00 -0000	[thread overview]
Message-ID: <20070219141214.21795.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30858-9596@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from dorit at il dot ibm dot com  2007-02-19 14:12 -------
Looks like I wasn't careful enough with my fix for PR30771. Here is a fix for
that fix I'm now testing:

Index: tree-vect-analyze.c
===================================================================
--- tree-vect-analyze.c (revision 122128)
+++ tree-vect-analyze.c (working copy)
@@ -124,10 +124,11 @@

          /* Two cases of "relevant" phis: those that define an
             induction that is used in the loop, and those that
-            define a reduction.  */
+            directly define a reduction.  */
          if ((STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop
               && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
-             || (STMT_VINFO_RELEVANT (stmt_info) == vect_used_by_reduction
+             || (STMT_VINFO_RELEVANT (stmt_info) ==
+                                          vect_used_directly_by_reduction
                  && STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def))
             {
              gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
@@ -328,8 +329,12 @@
            return false;
          }

-         if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop
-             && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
+         if ((STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop
+              && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
+             || (STMT_VINFO_RELEVANT (stmt_info) >
+                                           vect_used_directly_by_reduction
+                  && STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def))
+
            {
              /* Most likely a reduction-like computation that is used
                 in the loop.  */
@@ -2313,9 +2318,11 @@
       if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def)
        {
          gcc_assert (relevant == vect_unused_in_loop && live_p);
-         relevant = vect_used_by_reduction;
+         relevant = vect_used_directly_by_reduction;
          live_p = false;
        }
+      else if (relevant == vect_used_directly_by_reduction)
+       relevant = vect_used_by_reduction;

       i = 0;
       FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE)
Index: tree-vectorizer.h
===================================================================
--- tree-vectorizer.h   (revision 122128)
+++ tree-vectorizer.h   (working copy)
@@ -175,6 +175,7 @@
 /* Indicates whether/how a variable is used in the loop.  */
 enum vect_relevant {
   vect_unused_in_loop = 0,
+  vect_used_directly_by_reduction,
   vect_used_by_reduction,
   vect_used_in_loop
 };


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30858


  parent reply	other threads:[~2007-02-19 14:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-19 11:59 [Bug c/30858] New: " dcb314 at hotmail dot com
2007-02-19 11:59 ` [Bug c/30858] " dcb314 at hotmail dot com
2007-02-19 12:45 ` dorit at il dot ibm dot com
2007-02-19 12:56 ` dorit at il dot ibm dot com
2007-02-19 13:17 ` [Bug tree-optimization/30858] [4.3 Regression] " rguenth at gcc dot gnu dot org
2007-02-19 14:12 ` dorit at il dot ibm dot com [this message]
2007-02-20 22:56 ` dorit at il dot ibm dot com
2007-02-21 12:17 ` dcb314 at hotmail dot com
2007-02-21 19:31 ` dorit at il dot ibm dot com
2007-02-22  1:01 ` patchapp at dberlin dot org
2007-02-22  8:16 ` dorit at gcc dot gnu dot org
2007-06-18  5:47 ` pinskia at gcc dot gnu dot 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=20070219141214.21795.qmail@sourceware.org \
    --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).