PATCH: PR rtl-optimization/49504: Invalid optimization for Pmode != ptr_mode

Eric Botcazou
Fri Jun 24 10:00:00 GMT 2011

> I just don't see how nonzero_bits1 can assume if pointers extend unsigned
> and this is an addition or subtraction to a pointer in Pmode, all the bits
> bove ptr_mode are known to be zero.  We never run into it before x32
> since x32 is the first such target.

I agree that this is overly optimistical, but this was done on purpose:

Could you evaluate the pessimization that the patch introduces (if any) for the 
generated code on x32?  If there is none or it is negligible, the patch is OK 
if completed by the removal of the equivalent code in num_sign_bit_copies1.
If it isn't negligible, we may need to be clever and devise something else.

Eric Botcazou

More information about the Gcc-patches mailing list