Alpha doesnt unroll loops
Oskar Enoksson
osken393@student.liu.se
Thu Sep 24 06:45:00 GMT 1998
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 /*
More information about the Gcc-bugs
mailing list