public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/53395] New: [4.8 Regression] The LAPACK functions i(d|s)amax are more than two times slower after revision 187183
@ 2012-05-18 11:45 dominiq at lps dot ens.fr
  2012-05-18 11:48 ` [Bug middle-end/53395] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-05-18 11:45 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-09-03 20:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 11:45 [Bug tree-optimization/53395] New: [4.8 Regression] The LAPACK functions i(d|s)amax are more than two times slower after revision 187183 dominiq at lps dot ens.fr
2012-05-18 11:48 ` [Bug middle-end/53395] " rguenth at gcc dot gnu.org
2012-05-18 11:54 ` [Bug tree-optimization/53395] " dominiq at lps dot ens.fr
2012-05-18 16:02 ` pinskia at gcc dot gnu.org
2012-05-18 17:34 ` pinskia at gcc dot gnu.org
2012-05-18 17:42 ` pinskia at gcc dot gnu.org
2012-05-18 17:46 ` dominiq at lps dot ens.fr
2012-05-18 17:51 ` pinskia at gcc dot gnu.org
2012-05-21 10:11 ` rguenth at gcc dot gnu.org
2012-08-28  1:18 ` pinskia at gcc dot gnu.org
2012-08-28  7:05 ` pinskia at gcc dot gnu.org
2012-09-03 20:32 ` pinskia at gcc dot gnu.org
2012-09-03 20:32 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).