re PR tree-optimization/92347 (ICE in vect_get_vec_def_for_operand_1, at tree-vect...
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 12 Nov 2019 07:54:01 +0000 (07:54 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 12 Nov 2019 07:54:01 +0000 (07:54 +0000)
2019-11-11  Andre Vieira  <andre.simoesdiasvieira@arm.com>

        PR tree-optimization/92347
        * tree-vect-loop.c (vect_transform_loop): Don't overwrite epilogues
        safelen with 0.

        * gcc.dg/vect/pr92347.c: New test.

From-SVN: r278079

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

index 4a38e5459b482705af4767ab76a0f69a9aa9d489..77ede4d0b2d2a12ec6b005308341196a92d019f9 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       * tree-vect-loop.c (vect_transform_loop): Don't overwrite epilogues
+       safelen with 0.
+
 2019-11-12  Alan Modra  <amodra@gmail.com>
 
        * config/rs6000/predicates.md (unspec_tls): Allow const0_rtx for got
index 872495bbae7cda29058e757292313249f40e380b..1ef92af00618e5161eada52cfa88afbd14ee987e 100644 (file)
@@ -1,3 +1,7 @@
+2019-11-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       * gcc.dg/vect/pr92347.c: New test.
+
 2019-11-11  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/92447
diff --git a/gcc/testsuite/gcc.dg/vect/pr92347.c b/gcc/testsuite/gcc.dg/vect/pr92347.c
new file mode 100644 (file)
index 0000000..f75b259
--- /dev/null
@@ -0,0 +1,18 @@
+/* Copied from PR 92347.  */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target { i?86-*-* x86_64-*-* } } } */
+
+int by;
+
+#pragma omp declare simd
+int
+zp (int);
+
+void
+qh (int oh)
+{
+#pragma omp simd
+  for (by = 0; by < oh; ++by)
+    by = zp (by);
+}
index 78fe6290ee6bf069f7cfaabba466f119e41f39ac..b600d3157457c3180d0456c4f66cbc57012e3c71 100644 (file)
@@ -8587,7 +8587,6 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 
       epilogue->simduid = loop->simduid;
       epilogue->force_vectorize = loop->force_vectorize;
-      epilogue->safelen = loop->safelen;
       epilogue->dont_vectorize = false;
     }