public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR66677
@ 2015-06-26 11:41 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2015-06-26 11:41 UTC (permalink / raw)
  To: gcc-patches


Bootstrap & regtest running on x86_64-unknown-linux-gnu.

Richard.

2015-06-26  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.

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	(revision 225007)
+++ gcc/tree-vect-stmts.c	(working copy)
@@ -7620,14 +7620,8 @@ vect_transform_stmt (gimple stmt, gimple
   /* 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.  */
Index: gcc/testsuite/gcc.dg/vect/pr66677.c
===================================================================
--- gcc/testsuite/gcc.dg/vect/pr66677.c	(revision 0)
+++ gcc/testsuite/gcc.dg/vect/pr66677.c	(working copy)
@@ -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;
+    }
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-26 11:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 11:41 [PATCH] Fix PR66677 Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).