> Right, didn't notice nonzero_sign_valid below. I think restricting mode ==
> last_set_mode is too restrictive.
>
> nonzero_bits is still valid if the new mode has less precision than the old
> mode.
Sure, but I'm not suggesting to restrict anything, quite the contrary:
{
unsigned HOST_WIDE_INT mask = rsp->last_set_nonzero_bits;
if (GET_MODE_PRECISION (rsp->last_set_mode) < GET_MODE_PRECISION (mode))
/* We don't know anything about the upper bits. */
mask |= GET_MODE_MASK (mode) ^ GET_MODE_MASK (rsp->last_set_mode);
*nonzero &= mask;
return NULL;
}
--
Eric Botcazou