]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR tree-optimization/59164 (ice: tree check: expected tree that contains...
authorRichard Biener <rguenther@suse.de>
Wed, 7 May 2014 11:51:36 +0000 (11:51 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 7 May 2014 11:51:36 +0000 (11:51 +0000)
2014-05-07  Richard Biener  <rguenther@suse.de>

Backport from mainline
2013-11-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/59164
* 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: r210154

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

index 156b5a550ce677f9355f9785423cb918ee55c990..8e1bbfc8083ddfe754302cd61ccc37edc60fa222 100644 (file)
@@ -1,3 +1,13 @@
+2014-05-07  Richard Biener  <rguenther@suse.de>
+
+       Backport from mainline
+       2013-11-19  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/59164
+       * 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.
+
 2014-05-07  Richard Biener  <rguenther@suse.de>
 
        Backport from mainline
index 2bd98d4f0525add2fce83dc9e0c60349618a6998..9ae3e94ca1f669d1f0b303aa5b6189bbebf67f47 100644 (file)
@@ -1,3 +1,11 @@
+2014-05-07  Richard Biener  <rguenther@suse.de>
+
+       Backport from mainline
+       2013-11-19  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/59164
+       * gcc.dg/torture/pr59164.c: New testcase.
+
 2014-05-07  Richard Biener  <rguenther@suse.de>
 
        Backport from mainline
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 b6f85d8e19c72b98fd5e24930108312ca7293e28..c73d758570fb1f5c51987ae4e209b7da68ec6f01 100644 (file)
@@ -1466,7 +1466,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp)
 
   if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
       || LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0
-      || LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
+      || LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
     {
       if (vect_print_dump_info (REPORT_DETAILS))
         fprintf (vect_dump, "epilog loop required.");