https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116136

Richard Sandiford <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org

--- Comment #2 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
I was curious how far back this went, but it seems to be present in the
original combine.c commit:

      /* Changing mode twice with SUBREG => just change it once,
         or not at all if changing back to starting mode.  */
      if (GET_CODE (SUBREG_REG (x)) == SUBREG)
       {
         if (mode == GET_MODE (SUBREG_REG (SUBREG_REG (x)))
             && SUBREG_WORD (x) == 0 && SUBREG_WORD (SUBREG_REG (x)) == 0)
           return SUBREG_REG (SUBREG_REG (x));

Kind-of amazed that this went undetected so long, especially since multiword
big-endian values were much more common back in the day.

Reply via email to