From: Ira Rosen Date: Mon, 5 May 2008 07:47:49 +0000 (+0000) Subject: re PR tree-optimization/36119 (internal compiler error: in vectorizable_assignment... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06d10aafc795b81a5ce00c796a2c9ca2c468c465;p=gcc.git re PR tree-optimization/36119 (internal compiler error: in vectorizable_assignment, at tree-vect-transform.c:3671) PR tree-optimization/36119 * tree-vect-transform.c (vectorizable_assignment): Set NCOPIES to 1 in case of SLP. From-SVN: r134944 --- 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 + + PR tree-optimization/36119 + * tree-vect-transform.c (vectorizable_assignment): Set NCOPIES to 1 + in case of SLP. + 2008-06-04 Jan Hubicka 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 + + PR tree-optimization/36119 + * gfortran.dg/vect/pr36119.f: New test. + 2008-05-04 Thomas Koenig 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 */