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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |easyhack,
                   |                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-03-06
            Version|unknown                     |10.0
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, bswap load is supposed to detect this.  Not sure what it doesn't like
here - eventually the (int) promotion before the shift (wider representation
than what it likely initializes the lattice from (uint16).  Shouldn't be
hard to fix.

  <bb 2> [local count: 1073741824]:
  _1 = data[addr_10(D)];
  _2 = (signed short) _1;
  _3 = addr_10(D) + 1;
  _4 = data[_3];
  _5 = (int) _4;
  _6 = _5 << 8;
  _7 = (signed short) _6;
  _8 = _2 | _7;
  _11 = (uint16_t) _8;
  return _11;

Reply via email to