]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/26360 (Autovectorization of char -> int loop gets ICE)
authorDorit Nuzman <dorit@il.ibm.com>
Mon, 5 Jun 2006 08:56:49 +0000 (08:56 +0000)
committerVictor Kaplansky <victork@gcc.gnu.org>
Mon, 5 Jun 2006 08:56:49 +0000 (08:56 +0000)
Changelog:
        PR tree-optimization/26360
        * tree-vectorizer.c (destroy_loop_vec_info): Remove (dead) pattern
        stmts.

testsuite/Changelog:
        PR tree-optimizations/26360
        * gcc.dg/vect/vect.exp: Compile tests prefixed with "no-tree-dce"
        with -fno-tree-dce.
        * gcc.dg/vect/no-tree-dce-pr26360.c: New test.

Co-Authored-By: Victor Kaplansky <victork@il.ibm.com>
From-SVN: r114386

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect.exp
gcc/tree-vectorizer.c

index 66df5a9763fc52994935f09408fddaa7e60d803c..25d4311771489599f8c988dd4b1b60ae062fdfc2 100644 (file)
@@ -1,3 +1,10 @@
+2006-06-05  Dorit Nuzman  <dorit@il.ibm.com>
+           Victor Kaplansky  <victork@il.ibm.com>
+
+        PR tree-optimization/26360
+        * tree-vectorizer.c (destroy_loop_vec_info): Remove (dead) pattern
+        stmts.
+
 2006-06-04  Roger Sayle  <roger@eyesopen.com>
            Andrew Pinski  <pinskia@physics.uc.edu>
 
index a47d993bd7785f2bfabb81e8a8075659f6890f32..5327821839f3ea4e739d0f7d23e8e39c3a626076 100644 (file)
@@ -1,3 +1,11 @@
+2006-06-05  Dorit Nuzman  <dorit@il.ibm.com>
+            Victor Kaplansky  <victork@il.ibm.com>
+           
+        PR tree-optimizations/26360
+        * gcc.dg/vect/vect.exp: Compile tests prefixed with "no-tree-dce"
+        with -fno-tree-dce.
+        * gcc.dg/vect/no-tree-dce-pr26360.c: New test.
+
 2006-06-05  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/14067
index 499ef00da58992b1c0b0c05273d72bd256a35d2f..2873b5860ee758ef236866d8d5c0157b27694eda 100644 (file)
@@ -115,6 +115,12 @@ lappend DEFAULT_VECTCFLAGS "-fdump-tree-dceloop-details"
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/dump-tree-dceloop-*.\[cS\]]]  \
         "" $DEFAULT_VECTCFLAGS
 
+# -fno-tree-dce tests
+set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
+lappend DEFAULT_VECTCFLAGS "-fno-tree-dce"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-dce-*.\[cS\]]]  \
+       "" $DEFAULT_VECTCFLAGS
+
 # With -Os
 lappend DEFAULT_VECTCFLAGS "-Os"
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]]  \
index b6538a4b46dd86f53e3aca0c6ae7385d2e64288a..c0d783474de152cdfbbc69f97d215ebfe9813264 100644 (file)
@@ -1467,7 +1467,7 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo)
           set_stmt_info (ann, NULL);
         }
 
-      for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
+      for (si = bsi_start (bb); !bsi_end_p (si); )
        {
          tree stmt = bsi_stmt (si);
          stmt_ann_t ann = stmt_ann (stmt);
@@ -1475,10 +1475,28 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo)
 
          if (stmt_info)
            {
+             /* Check if this is a "pattern stmt" (introduced by the 
+                vectorizer during the pattern recognition pass).  */
+             bool remove_stmt_p = false;
+             tree orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
+             if (orig_stmt)
+               {
+                 stmt_vec_info orig_stmt_info = vinfo_for_stmt (orig_stmt);
+                 if (orig_stmt_info
+                     && STMT_VINFO_IN_PATTERN_P (orig_stmt_info))
+                   remove_stmt_p = true; 
+               }
+                       
+             /* Free stmt_vec_info.  */
              VEC_free (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmt_info));
              free (stmt_info);
              set_stmt_info ((tree_ann_t)ann, NULL);
+
+             /* Remove dead "pattern stmts".  */
+             if (remove_stmt_p)
+               bsi_remove (&si, true);
            }
+         bsi_next (&si);
        }
     }
 
This page took 2.290467 seconds and 5 git commands to generate.