re PR tree-optimization/66677 (ICE: in vect_transform_stmt, at tree-vect-stmts.c...
authorRichard Biener <rguenther@suse.de>
Mon, 29 Jun 2015 07:30:47 +0000 (07:30 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 29 Jun 2015 07:30:47 +0000 (07:30 +0000)
2015-06-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/66677
* tree-vect-stmts.c (vect_transform_stmt): Make assert about
STMT_VINFO_VEC_STMT clobbering less strict.

* gcc.dg/vect/pr66677.c: New testcase.

From-SVN: r225112

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

index 239ea9e66c723d782b384552c77c476a2eebd20f..d819b253ec93880eab299f7f3ad6e25fe34b430a 100644 (file)
@@ -1,3 +1,9 @@
+2015-06-29  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/66677
+       * tree-vect-stmts.c (vect_transform_stmt): Make assert about
+       STMT_VINFO_VEC_STMT clobbering less strict.
+
 2015-06-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
 
        PR middle-end/64130
index fda80ddedbc19c99f3412908cb963ec056d7e323..b4bd5dae784e719ea00eefeed7d1a77ed17445e3 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-29  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/66677
+       * gcc.dg/vect/pr66677.c: New testcase.
+
 2015-06-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
 
        PR middle-end/64130
diff --git a/gcc/testsuite/gcc.dg/vect/pr66677.c b/gcc/testsuite/gcc.dg/vect/pr66677.c
new file mode 100644 (file)
index 0000000..b95ac46
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-msse4" { target x86_64-*-* i?86-*-* } } */
+
+int *a, *b;
+void fn1(char *p1)
+{
+  int x;
+  for (; x; x += 2)
+    {
+      a[x] = p1[0];
+      a[x + 1] = 0;
+      b[x] = b[x + 1] = p1[1];
+      p1 += 4;
+    }
+}
index 82968199f80d7cf5b63c84423689e164e0963f4d..6592be2e884d83f81b2a1160462d1be5d0779e49 100644 (file)
@@ -7620,14 +7620,8 @@ vect_transform_stmt (gimple stmt, gimple_stmt_iterator *gsi,
   /* Verify SLP vectorization doesn't mess with STMT_VINFO_VEC_STMT.
      This would break hybrid SLP vectorization.  */
   if (slp_node)
-    {
-      if (PURE_SLP_STMT (stmt_info))
-       gcc_assert (!old_vec_stmt && !vec_stmt
-                   && !STMT_VINFO_VEC_STMT (stmt_info));
-      else if (HYBRID_SLP_STMT (stmt_info))
-       gcc_assert (!vec_stmt
-                   && STMT_VINFO_VEC_STMT (stmt_info) == old_vec_stmt);
-    }
+    gcc_assert (!vec_stmt
+               && STMT_VINFO_VEC_STMT (stmt_info) == old_vec_stmt);
 
   /* Handle inner-loop stmts whose DEF is used in the loop-nest that
      is being vectorized, but outside the immediately enclosing loop.  */