From: Richard Biener Date: Mon, 30 Nov 2015 14:50:48 +0000 (+0000) Subject: re PR tree-optimization/68592 (ICE in vect_get_vec_def_for_operand, at tree-vect... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a5a0decae0af00cf736ec2c8558c185e59e47b8;p=gcc.git re PR tree-optimization/68592 (ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1403 with -fprofile-generate) 2015-11-30 Richard Biener 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. From-SVN: r231074 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f5a8238869d..94ce1a4c241 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-30 Richard Biener + + PR tree-optimization/68592 + * tree-vect-loop.c (vect_analyze_loop_2): Reset SLP type also + on the pattern def sequence. + 2015-11-30 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_name_replacement): Move earlier. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 805d7943d25..368b4e7791a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-11-30 Richard Biener + + PR tree-optimization/68592 + * gfortran.dg/pr68592.f: New testcase. + 2015-11-30 Paul Thomas PR fortran/68534 diff --git a/gcc/testsuite/gfortran.dg/pr68592.f b/gcc/testsuite/gfortran.dg/pr68592.f new file mode 100644 index 00000000000..413ce80e206 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr68592.f @@ -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 diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 7d1f555be79..ee321667a86 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -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; }