re PR tree-optimization/68592 (ICE in vect_get_vec_def_for_operand, at tree-vect...
authorRichard Biener <rguenther@suse.de>
Mon, 30 Nov 2015 14:50:48 +0000 (14:50 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 30 Nov 2015 14:50:48 +0000 (14:50 +0000)
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.

From-SVN: r231074

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr68592.f [new file with mode: 0644]
gcc/tree-vect-loop.c

index f5a8238869d4209af0201bb031413cfdfeb5caed..94ce1a4c241a37369b1ed41fbf2f462d92c7b124 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2015-11-30  Nathan Sidwell  <nathan@acm.org>
 
        * config/nvptx/nvptx.c (nvptx_name_replacement): Move earlier.
index 805d7943d2570fa810568253a1a972bd6c316636..368b4e7791a2649f6074d6406ccc0d513dee77cb 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-30  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/68592
+       * gfortran.dg/pr68592.f: New testcase.
+
 2015-11-30  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/68534
diff --git a/gcc/testsuite/gfortran.dg/pr68592.f b/gcc/testsuite/gfortran.dg/pr68592.f
new file mode 100644 (file)
index 0000000..413ce80
--- /dev/null
@@ -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
index 7d1f555be79d033b93a9ed6143f6b019ce7f053e..ee321667a86427d027b455bdb4b3fc40f8cd0de9 100644 (file)
@@ -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;
        }