]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/58010 (ICE in vect_create_epilog_for_reduction, at tree-vect...
authorRichard Biener <rguenther@suse.de>
Fri, 30 Aug 2013 07:47:54 +0000 (07:47 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 30 Aug 2013 07:47:54 +0000 (07:47 +0000)
2013-08-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/58010
* tree-vect-loop.c (vect_create_epilog_for_reduction): Remove
assert that we have a loop-closed PHI.

* gcc.dg/pr58010.c: New testcase.

From-SVN: r202095

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr58010.c [new file with mode: 0644]
gcc/tree-vect-loop.c

index 83e36218d4aefdb8d8e51cfc3c1e05c52782df8c..3c46e54135efc8e3aff5c0fad80a73675c34042e 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-30  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/58010
+       * tree-vect-loop.c (vect_create_epilog_for_reduction): Remove
+       assert that we have a loop-closed PHI.
+
 2013-08-29  Jan Hubicka  <jh@suse.cz>
 
        * lto-symtab.c (lto_cgraph_replace_node): Free decl_in_state.
index a3afbcedd029d7819db430920c7425b6775d51b2..8d93f2ef9936226eb5440317117c534055f39aa1 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-30  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/58010
+       * gcc.dg/pr58010.c: New testcase.
+
 2013-08-29  Xinliang DavidLi  <davidxl@google.com>
        
        * gcc.dg/unroll_3.c: Message change.
diff --git a/gcc/testsuite/gcc.dg/pr58010.c b/gcc/testsuite/gcc.dg/pr58010.c
new file mode 100644 (file)
index 0000000..a0fbd31
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -funswitch-loops -ftree-vectorize" } */
+
+short a, b, c, d;
+
+void f(void)
+{
+  short e;
+
+  for(; e; e++)
+    for(; b; b++);
+
+  for(d = 0; d < 4; d++)
+    a ^= (e ^= 1) || c ? : e;
+}
index 3e1cbb19bfd6e9eaac4bf2343a988abec1297d6e..e8a4ac1643b06f91871ddb2e68de89b51d4c2b7e 100644 (file)
@@ -4373,9 +4373,8 @@ vect_finalize_reduction:
         if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
           phis.safe_push (USE_STMT (use_p));
 
-      /* We expect to have found an exit_phi because of loop-closed-ssa
-         form.  */
-      gcc_assert (!phis.is_empty ());
+      /* While we expect to have found an exit_phi because of loop-closed-ssa
+         form we can end up without one if the scalar cycle is dead.  */
 
       FOR_EACH_VEC_ELT (phis, i, exit_phi)
         {
This page took 0.092805 seconds and 5 git commands to generate.