summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-05 07:47:49 +0000
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-05 07:47:49 +0000
commit960a79c42a74ed711ed7fe15829f0f4fb8578616 (patch)
tree98ef947137edf3e0bf32eafe3f4091018ee32ae2
parent7309a3bb7da86799354cecd19791bd96c0065c75 (diff)
downloadgcc-960a79c42a74ed711ed7fe15829f0f4fb8578616.tar.gz
PR tree-optimization/36119
* tree-vect-transform.c (vectorizable_assignment): Set NCOPIES to 1 in case of SLP. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134944 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/vect/pr36119.f29
-rw-r--r--gcc/tree-vect-transform.c5
4 files changed, 45 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 38ac5f507bd..ffc49ab0887 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 11fb08ced85..c65deaf2ad4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..d4b11cb3679
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/pr36119.f
@@ -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" } }
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 6168fdab74d..7c5b68e0fdf 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -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 */