> 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: http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00316.html 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