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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
         Resolution|---                         |FIXED
          Component|target                      |tree-optimization
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 11, in EVRP.  I can't figure out which patch caused it but what
happens is the following:
We figure out the range of _3 to be [0, 255]
 _3 = (int) bit_16;

While processing:
  _4 = _2 >> _3;

We figure out the range of _4 is still [0, 255] as it is a right shift so we
cannot change any upper bits.

And then we match and simplify the following:
  _24 = _4 & 255;

to just:
 _24 = _4;

Reply via email to