public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR66677
Date: Fri, 26 Jun 2015 11:41:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.11.1506261331310.26650@zhemvz.fhfr.qr> (raw)


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;
+    }
+}

                 reply	other threads:[~2015-06-26 11:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.11.1506261331310.26650@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).