re PR tree-optimization/36119 (internal compiler error: in vectorizable_assignment...
authorIra Rosen <irar@il.ibm.com>
Mon, 5 May 2008 07:47:49 +0000 (07:47 +0000)
committerIra Rosen <irar@gcc.gnu.org>
Mon, 5 May 2008 07:47:49 +0000 (07:47 +0000)
PR tree-optimization/36119
* tree-vect-transform.c (vectorizable_assignment): Set NCOPIES to 1
in case of SLP.

From-SVN: r134944

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

index 38ac5f507bd91b7909e5746e7d5140f4c3f15266..ffc49ab08876d300d19a1a94afb855b7de723969 100644 (file)
@@ -1,3 +1,9 @@
+2008-05-05  Ira Rosen  <irar@il.ibm.com>
+
+        PR tree-optimization/36119
+       * tree-vect-transform.c (vectorizable_assignment): Set NCOPIES to 1
+       in case of SLP.
+
 2008-06-04  Jan Hubicka  <jh@suse.cz>
 
        tree-optimization/36100
index 11fb08ced85f2666ae3fdc0290f2d38ab7d1a808..c65deaf2ad43aa0dd43598c8a0e5a45edabda039 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-05  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/36119
+       * gfortran.dg/vect/pr36119.f: New test. 
+
 2008-05-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR libfortran/35995
diff --git a/gcc/testsuite/gfortran.dg/vect/pr36119.f b/gcc/testsuite/gfortran.dg/vect/pr36119.f
new file mode 100644 (file)
index 0000000..d4b11cb
--- /dev/null
@@ -0,0 +1,29 @@
+! { dg-do compile { target { i?86-*-* x86_64-*-* } } } 
+! { dg-options "-O3 -mfpmath=sse -msse2 -ffree-form" } 
+
+SUBROUTINE check_dnucint_ana (dcore)
+  IMPLICIT NONE
+  INTEGER, PARAMETER :: dp=8
+  REAL(dp), DIMENSION(10, 2), INTENT(IN),&
+       OPTIONAL                            :: dcore
+  INTEGER                                  :: i, j
+  REAL(dp)                                 :: delta, nssss, od, rn, ssssm, &
+       ssssp
+  REAL(dp), DIMENSION(10, 2)               :: corem, corep, ncore
+  LOGICAL                                  :: check_value
+
+  delta = 1.0E-8_dp
+  od = 0.5_dp/delta
+  ncore = od * (corep - corem)
+  nssss = od * (ssssp - ssssm)
+  IF (PRESENT(dcore)) THEN
+     DO i = 1, 2
+        DO j = 1, 10
+           IF (.NOT.check_value(ncore(j,i), dcore(j,i), delta, 0.1_dp)) THEN
+           END IF
+        END DO
+     END DO
+  END IF
+END SUBROUTINE check_dnucint_ana
+
+! { dg-final { cleanup-tree-dump "vect" } } 
index 6168fdab74d9dfb84c87fd7c5f8145cc0018d455..7c5b68e0fdf60957e0b2a4b4428e1b0a591cc261 100644 (file)
@@ -3668,6 +3668,11 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
   VEC(tree,heap) *vec_oprnds = NULL;
   tree vop;
 
+  /* FORNOW: SLP with multiple types is not supported. The SLP analysis 
+     verifies this, so we can safely override NCOPIES with 1 here.  */
+  if (slp_node)
+    ncopies = 1;
+
   gcc_assert (ncopies >= 1);
   if (ncopies > 1)
     return false; /* FORNOW */