This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reg_nonzero_bits_for_combine misunderstood
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Paulo Matos <pmatos at broadcom dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 28 Nov 2013 12:26:41 +0100
- Subject: Re: reg_nonzero_bits_for_combine misunderstood
- Authentication-results: sourceware.org; auth=none
- References: <19EB96622A777C4AB91610E763265F463BF351 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <1864008 dot zDp4zennpb at polaris> <19EB96622A777C4AB91610E763265F463BF8B2 at SJEXCHMB14 dot corp dot ad dot broadcom dot com>
> 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