On 7/29/24 2:13 PM, Richard Sandiford wrote:
Sorry for the slow reply!
Slow?!? I think I sent that Thu/Fri last week. Nothing to be sorry about at all in my mind!


No, I agree it looks like a bug.  Seems like:

        if (outermode == innermostmode
            && known_eq (byte, 0U)
            && known_eq (SUBREG_BYTE (op), 0))
          return SUBREG_REG (op);

should be testing for subreg_lowpart_offset in both cases.
I'd largely concluded over the weekend that the simplify-rtx code was just wrong and should be using subreg_lowpart.

Essentially I was trying to write a comment in ext-dce.cc around a check to avoid this problem and I kept coming back to the phrase "avoid bug in SUBREG simplification". And that little hack in ext-dce that I have locally uses subreg_lowpart_p as one of its components.

jeff

Reply via email to