Uncessary long long produced in tree-ssa?

Ian Lance Taylor iant@google.com
Thu Apr 17 18:40:00 GMT 2008


"Bingfeng Mei" <bmei@broadcom.com> writes:

> I noticed in some cases GCC 4.3.0 produces unnecessary long long data
> type in tree ssa form. It results in inefficient 64-bit arithmetic in
> our porting. 

You neglected to mention the target.  I assume that pointers are
64-bits.  Otherwise this behaviour is inexplicable.  With 64-bit
pointers, you need 64-bit arithmetic.  gcc thinks it is being clever
by using an induction variable of the right type, rather than sign
extending the variable in the middle of the loop.  That may be the
wrong choice for your target.  In general gcc is not well optimized
for cases where pointers are larger than the ordinary register size.

If pointers are not 64-bits, then I have no idea what is going on.

Ian



More information about the Gcc mailing list