diff options
author | Richard Biener <rguenther@suse.de> | 2014-04-30 11:43:41 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-04-30 11:43:41 +0000 |
commit | a32776927ec9dd5757b52224d4cc63e80525adba (patch) | |
tree | b3594047b651cb2ea83359f0dba2f81c5fa57979 | |
parent | e9ff9caf265a47e747c12de69bcf5bd6db32843e (diff) | |
download | gcc-a32776927ec9dd5757b52224d4cc63e80525adba.zip gcc-a32776927ec9dd5757b52224d4cc63e80525adba.tar.gz gcc-a32776927ec9dd5757b52224d4cc63e80525adba.tar.bz2 |
re PR tree-optimization/48329 (Missed vectorization of reduction due to PRE)
2014-04-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/48329
* gfortran.dg/vect/pr48329.f90: New testcase.
From-SVN: r209930
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/vect/pr48329.f90 | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f07c90a..48da401 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-30 Richard Biener <rguenther@suse.de> + + PR tree-optimization/48329 + * gfortran.dg/vect/pr48329.f90: New testcase. + 2014-04-30 Marek Polacek <polacek@redhat.com> * c-c++-common/ubsan/div-by-zero-5.c: Fix formatting. diff --git a/gcc/testsuite/gfortran.dg/vect/pr48329.f90 b/gcc/testsuite/gfortran.dg/vect/pr48329.f90 new file mode 100644 index 0000000..6ad03d4 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/vect/pr48329.f90 @@ -0,0 +1,29 @@ +! { dg-do compile } +! { dg-require-effective-target vect_float } +! { dg-require-effective-target vect_intfloat_cvt } +! { dg-additional-options "-ffast-math" } + +program calcpi + + implicit none + real(kind=4):: h,x,sum,pi + integer:: n,i + real(kind=4):: f + + f(x) = 4.0/(1.0+x**2) + + n = 2100000000 + + h= 1.0 / n + sum = 0.0 + DO i=1, n + x = h * (i-0.5) + sum = sum + f(x) + END DO + pi = h * sum + write(*,*) 'Pi=',pi + +end program calcpi + +! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } +! { dg-final { cleanup-tree-dump "vect" } } |