This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77 performance on ALPHA


Richard Henderson wrote:

> On Sat, Aug 28, 1999 at 01:30:48PM +0200, martin.kahlert@provi.de wrote:

> > So i tested with a small daxpy operation:

> >       SUBROUTINE DAXPY(N,ALPHA,X,I1,Y,I2)
> >       IMPLICIT NONE
> >       INTEGER*4 N,I,I1,I2
> >       REAL*8 ALPHA,X(N),Y(N)
> >
> >       DO I=1, N
> >          Y(I)=Y(I)+ALPHA*X(I)
> >       ENDDO
> >       RETURN
> >       END
> [...]
> > The loop isn't unrolled with -funroll-loops, either.
> 
> Nope.  We don't know how to efficiently unroll loops with
> non-constant bounds.  We don't try unless forced ...

Huh?  Then there must be something pretty wrong with the alpha port -
this is the inner loop I get with g77 -O3 -funroll-loops, using
gcc-2.95.1 on Linux/Intel:

.L6:
        fld %st(0)
        fmull (%edx)
        faddl (%eax)
        fstpl (%eax)
        fld %st(0)
        fmull 8(%edx)
        faddl 8(%eax)
        fstpl 8(%eax)
        fld %st(0)
        fmull 16(%edx)
        faddl 16(%eax)
        fstpl 16(%eax)
        fld %st(0)
        fmull 24(%edx)
        faddl 24(%eax)
        addl $32,%edx
        fstpl 24(%eax)
        addl $32,%eax
        addl $-4,%ebx
        jns .L6

Looks cleanly unrolled four times, to me.

What's up, Doc ?

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]