This is the mail archive of the
mailing list for the GCC project.
Re: extension dependant givs
On Fri, Sep 08, 2000 at 03:41:06PM +0200, Toon Moene wrote:
> Why is this different on the IA-64 vs. Alpha - they're both 32-bit int,
> 64 bit pointer machines, no ?
Because IA-64 has a 32-bit compare instruction and Alpha doesn't.
That forces us to not have PROMOTE_MODE increase the width of
int variables to DImode. If we did that, we'd get truncation
via subreg at each comparison site. And truncation prevents us
from recognizing BIVs.
And now that we're mixing SImode and DImode registers in
pointer arithmetic, we've now got lots of sign and zero extensions.
> Sure, you added special code to the Fortran Frontend in '97 to get it to
> generate reasonable code vis a vis this problem - would be nice if we
> could remove it (and not have to add it to g95) ...
Yes, it would be nice.
> Is this also a problem with:
> int i, start, end;
> for (i = end - start; i >=0 ; --i)
> where start and end are untouched by the loop? (This is how Fortran
> loops are encoded).
Well, yes and no. The *counter* for Fortran loops is encoded
that way, but the "i" written by the Fortran programmer isn't.
So, yes, the same general solution applies to count-down BIVs,
but no, the Fortran loop counter is not used for pointer