]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/59164 (ice: tree check: expected tree that contains ‘decl...
authorRichard Biener <rguenther@suse.de>
Tue, 19 Nov 2013 15:00:10 +0000 (15:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 19 Nov 2013 15:00:10 +0000 (15:00 +0000)
2013-11-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/59164
* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
Uncomment assert.
* tree-vect-loop.c (vect_analyze_loop_operations): Adjust
check whether we can create an epilogue loop to reflect the
cases where we create one.

* gcc.dg/torture/pr59164.c: New testcase.

From-SVN: r205030

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

index 1a32bf02b6dc4ec931dd428f693743863bde6a3f..f54a4764c445630b9845942e95772c997140289e 100644 (file)
@@ -1,3 +1,12 @@
+2013-11-19  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/59164
+       * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
+       Uncomment assert.
+       * tree-vect-loop.c (vect_analyze_loop_operations): Adjust
+       check whether we can create an epilogue loop to reflect the
+       cases where we create one.
+
 2013-11-19  Andrew MacLeod  <amacleod@redhat.com>
 
        * graphite-sese-to-poly.c: Include expr.h.
index 89776eaab1a048d981ce291e800405c8ef5ba924..c9605bc0973e52a3ed23dd9f2a8d91af66873553 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-19  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/59164
+       * gcc.dg/torture/pr59164.c: New testcase.
+
 2013-11-19  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/58956
diff --git a/gcc/testsuite/gcc.dg/torture/pr59164.c b/gcc/testsuite/gcc.dg/torture/pr59164.c
new file mode 100644 (file)
index 0000000..1ec6961
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+int a, d, e;
+long b[10];
+int c[10][8];
+
+int fn1(p1)
+{ 
+  return 1 >> p1; 
+}
+
+void fn2(void)
+{
+  int f;
+  for (a=1; a <= 4; a++)
+    {
+      f = fn1(0 < c[a][0]);
+      if (f || d)
+       e = b[a] = 1;
+    }
+}
index 5c149951b846eb51f00cf20603ac8eb5b0a0ce34..3193f20e5a9e886c626ba8fe4d84c9f192f49cdb 100644 (file)
@@ -1673,7 +1673,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
   gimple_stmt_iterator gsi, gsi1;
   basic_block update_bb = update_e->dest;
 
-  /* gcc_assert (vect_can_advance_ivs_p (loop_vinfo)); */
+  gcc_checking_assert (vect_can_advance_ivs_p (loop_vinfo));
 
   /* Make sure there exists a single-predecessor exit bb:  */
   gcc_assert (single_pred_p (exit_bb));
index 4a277ae419ae0fb6c484e2dda1532633fbc4be2b..a97d413f5cdabe0625725b87b3cd261367d85516 100644 (file)
@@ -1588,24 +1588,19 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp)
       return false;
     }
 
-  if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo)
+  if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)
       || ((int) tree_ctz (LOOP_VINFO_NITERS (loop_vinfo))
          < exact_log2 (vectorization_factor)))
     {
       if (dump_enabled_p ())
-        dump_printf_loc (MSG_NOTE, vect_location, "epilog loop required.\n");
-      if (!vect_can_advance_ivs_p (loop_vinfo))
-        {
-          if (dump_enabled_p ())
-           dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-                            "not vectorized: can't create epilog loop 1.\n");
-          return false;
-        }
-      if (!slpeel_can_duplicate_loop_p (loop, single_exit (loop)))
+        dump_printf_loc (MSG_NOTE, vect_location, "epilog loop required\n");
+      if (!vect_can_advance_ivs_p (loop_vinfo)
+         || !slpeel_can_duplicate_loop_p (loop, single_exit (loop)))
         {
           if (dump_enabled_p ())
            dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-                            "not vectorized: can't create epilog loop 2.\n");
+                            "not vectorized: can't create required "
+                            "epilog loop\n");
           return false;
         }
     }
This page took 0.226142 seconds and 5 git commands to generate.