This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53395] New: [4.8 Regression] The LAPACK functions i(d|s)amax are more than two times slower after revision 187183
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 May 2012 10:31:00 +0000
- Subject: [Bug tree-optimization/53395] New: [4.8 Regression] The LAPACK functions i(d|s)amax are more than two times slower after revision 187183
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53395
Bug #: 53395
Summary: [4.8 Regression] The LAPACK functions i(d|s)amax are
more than two times slower after revision 187183
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dominiq@lps.ens.fr
CC: pinskia@gcc.gnu.org
As noted in pr53346, the LAPACK functions i(d|s)amax compiled with '-O3
-ffast-math -funroll-loops' are more than two times slower after revision
187183 on x86_64-apple-darwin10, as shown by the following results for a
reduced version of idamax (increment one only)
[macbook] test/dbg_rnflow% cat idamax_red.f90
integer function idamax(n,dx)
!
double precision dx(*),dmax
integer i,n
!
idamax = 1
20 dmax = dabs(dx(1))
do 30 i = 2,n
if(dabs(dx(i)).le.dmax) go to 30
idamax = i
dmax = dabs(dx(i))
30 continue
return
end
[macbook] test/dbg_rnflow% cat tst_idamax_red.f90
implicit none
integer, parameter :: n = 40000
integer :: i, j, res(n+1)
integer :: idamax
external idamax
real(8) :: x, dx, a(n+1)
dx = 2.0/real(n, kind=8)
do i = 0, n
x = dx*real(i, kind=8) - 1.0
a(i+1) = 1-2.0*(1-2.0*x**2)**2-0.1_8*x
end do
res = 0
do i = 0, n
j = idamax(n+1, a)
res(i+1) = j
a(i+1) = a(i+1) + 0.1_8
end do
print *, sum(res)
end
[macbook] test/dbg_rnflow% /opt/gcc/gcc4.8p-187182/bin/gfortran -c -O3
-ffast-math -funroll-loops idamax_red.f90
[macbook] test/dbg_rnflow% gfc tst_idamax_red.f90 idamax_red.o
[macbook] test/dbg_rnflow% time a.out
386062110
2.474u 0.002s 0:02.47 100.0% 0+0k 0+0io 0pf+0w
[macbook] test/dbg_rnflow% /opt/gcc/gcc4.8p-187183/bin/gfortran -c -O3
-ffast-math -funroll-loops idamax_red.f90
[macbook] test/dbg_rnflow% gfc tst_idamax_red.f90 idamax_red.o
[macbook] test/dbg_rnflow% time a.out
386062110
5.561u 0.004s 0:05.56 100.0% 0+0k 0+0io 0pf+0w