]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2019-10-14 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Oct 2019 11:47:15 +0000 (11:47 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Oct 2019 11:47:15 +0000 (11:47 +0000)
PR tree-optimization/92069
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): For nested
cycles do not set vect_nested_cycle on the latch definition.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276959 138bc75d-0d04-0410-961f-82ee72b054a4

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

index e755803b12c1dab5dc6e3c6e66094c15b1ac0924..c2cbd4274ca1fe47748fbf5919d1ee0ca4be217d 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-14  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/92069
+       * tree-vect-loop.c (vect_analyze_scalar_cycles_1): For nested
+       cycles do not set vect_nested_cycle on the latch definition.
+
 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
 
        * function-abi.h (expr_callee_abi): Declare.
index 13988f87736f5712f899b08db16378bbc2bdc35f..281da7ff85e24a761da144a59b133ec1dda1754c 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-14  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/92069
+       * gcc.dg/torture/pr92069.c: New testcase.
+
 2019-10-14  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * g++.dg/cpp0x/constexpr-union5.C: Test location(s) too.
diff --git a/gcc/testsuite/gcc.dg/torture/pr92069.c b/gcc/testsuite/gcc.dg/torture/pr92069.c
new file mode 100644 (file)
index 0000000..806ff5f
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ftree-vectorize" } */
+
+unsigned int a, c, d;
+double b;
+void e()
+{
+  for (; d; d++)
+    {
+      double f;
+      a = 2;
+      for (; a; a++)
+       {
+         c = b;
+         b = f;
+         f = c;
+       }
+    }
+}
index cb95ea36298886955cfd789c75f09242e02e98d1..de018acefad382dfe7c7a2ef8dd24e1e0fd8fd56 100644 (file)
@@ -584,7 +584,6 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop)
                                     "Detected vectorizable nested cycle.\n");
 
                   STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_nested_cycle;
-                 STMT_VINFO_DEF_TYPE (reduc_stmt_info) = vect_nested_cycle;
                 }
               else
                 {