From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR68592
Date: Mon, 30 Nov 2015 14:46:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1511301542160.4884@t29.fhfr.qr> (raw)
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
reply other threads:[~2015-11-30 14:43 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.1511301542160.4884@t29.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).