mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-26 07:24:08 +08:00
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
This commit is contained in:
parent
e9ff9caf26
commit
a32776927e
@ -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.
|
||||
|
29
gcc/testsuite/gfortran.dg/vect/pr48329.f90
Normal file
29
gcc/testsuite/gfortran.dg/vect/pr48329.f90
Normal file
@ -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" } }
|
Loading…
Reference in New Issue
Block a user