This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Alpha doesnt unroll loops
- To: egcs-bugs at cygnus dot com
- Subject: Alpha doesnt unroll loops
- From: Oskar Enoksson <osken393 at student dot liu dot se>
- Date: Thu, 24 Sep 1998 15:44:43 +0200 (MET DST)
- cc: wilson at cygnus dot com, rth at cygnus dot com
I can't make loop unrolling work with gcc for alpha. I've tried egcs
1.1 and snapshot 980914. I think this must be a bug because:
1) The same loops are unrolled with the same version of gcc on Pentium.
2) g77 unrolls fortran loops ok on both Pentium and Alpha.
For example:
main() {
double a[50];
int i;
for(i=0; i<50; i++)
a[i]=0;
}
> gcc -O3 -fstrict-aliasing -funroll-loops -S
.verstamp 3 11
.set noreorder
.set volatile
.set noat
.arch ev56
.file 1 "foo.c"
.text
.align 5
.globl main
.ent main
main:
.frame $30,400,$26,0
$main..ng:
lda $30,-400($30)
.prologue 0
bis $31,$31,$3
bis $30,$30,$2
.align 4
$L5:
stq $31,0($2)
addl $3,1,$3
addq $2,8,$2
cmple $3,49,$1
bne $1,$L5
lda $30,400($30)
ret $31,($26),1
.end main
As can be seen above, no loop unrolling is done on Alpha. On Pentium loop
is unrolled however.
Mail me if you need more info!
Regards.
/Oskar
*/ Oskar Enoksson, Linkoping, Sweden /*