loop unroll question
Revital Eres
ERES@il.ibm.com
Thu Apr 1 14:53:00 GMT 2004
Hello,
For mainline on power-pc 4 with the option -O3 -funroll-loops,
the following loop is not unrolled, but in GCC 3.4 it is.
Also for mainline the bct is not inserted, but again in GCC 3.4
it is.
void
example_new(int a[],int b[],int c[], int j)
{
int i;
for(i=0 ; i<=j ; i++)
{
c[i]=a[i]+b[i];
}
return;
}
If the condition is changed to < (instead of <=) the unrolling is
done as expected and bct is inserted.
Thanks,
Revital
More information about the Gcc
mailing list