This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reg_nonzero_bits_for_combine misunderstood


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]