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


The following fixes PR68592 where I forgot the pattern def seq when
resetting SLP type.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2015-11-30  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68592
	* tree-vect-loop.c (vect_analyze_loop_2): Reset SLP type also
	on the pattern def sequence.

	* gfortran.dg/pr68592.f: New testcase.

Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c	(revision 231065)
+++ gcc/tree-vect-loop.c	(working copy)
@@ -2178,6 +2178,13 @@ again:
 	    {
 	      gcc_assert (STMT_SLP_TYPE (stmt_info) == loop_vect);
 	      stmt_info = vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_info));
+	      for (gimple_stmt_iterator pi
+		     = gsi_start (STMT_VINFO_PATTERN_DEF_SEQ (stmt_info));
+		   !gsi_end_p (pi); gsi_next (&pi))
+		{
+		  gimple *pstmt = gsi_stmt (pi);
+		  STMT_SLP_TYPE (vinfo_for_stmt (pstmt)) = loop_vect;
+		}
 	    }
 	  STMT_SLP_TYPE (stmt_info) = loop_vect;
 	}
Index: gcc/testsuite/gfortran.dg/pr68592.f
===================================================================
--- gcc/testsuite/gfortran.dg/pr68592.f	(revision 0)
+++ gcc/testsuite/gfortran.dg/pr68592.f	(working copy)
@@ -0,0 +1,20 @@
+! PR tree-optimization/68592
+! { dg-do compile }
+! { dg-require-profiling "-fprofile-generate" }
+! { dg-options "-Ofast -fprofile-generate" }
+! { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } }
+      PARAMETER (MXCPGA=320,ZERO=0.0)
+      DIMENSION CPNORM(MXCPGA),CDNORM(MXCPGA),
+     *          CFNORM(MXCPGA)  
+         KTYPIL        = KTYPI()
+         DO 84 K=1,NOGTF
+           LMP=LMP+1
+           CFNORM(LMP)=ZERO
+           IF (KTYPIL.EQ.1) LMP=CMPILMP
+           IF (KTYPIL.EQ.2) CPNORM(LMP)=CMPILMP
+           IF (KTYPIL.EQ.3) CDNORM(LMP)=CMPILMP
+           IF (KTYPIL.EQ.4) LMP=CMPILMP
+           IF (KTYPIL.EQ.6) LMP=CMPILMP
+   84    CONTINUE
+         CALL MMPNOR(CPNORM,CDNORM,CFNORM) 
+      END

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

only message in thread, other threads:[~2015-11-30 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 14:46 [PATCH] Fix PR68592 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).