OSDN Git Service

2014-05-07 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 May 2014 11:51:36 +0000 (11:51 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 May 2014 11:51:36 +0000 (11:51 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@210154 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 156b5a5..8e1bbfc 100644 (file)
@@ -1,6 +1,16 @@
 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
        2013-11-29  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/59334
index 2bd98d4..9ae3e94 100644 (file)
@@ -1,6 +1,14 @@
 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
        2013-11-28  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/59330
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 b6f85d8..c73d758 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.");