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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |9.0
         Resolution|---                         |FIXED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is fixed in GCC 9+ on the rtl level due to gimple level changes.  GCC 10+
late FRE (which was added by r10-1420) can detect it and remove the redudancy.


The GCC 9 change was due to this:
  _25 = _24 /[ex] 4;
  _27 = _25 + 1;
  _28 = _27 * 4;

Being transformed into just:
  _28 = _24 + 4;

Which was due to r9-3247.

So fixed in GCC 9 with it fully fixed in GCC 10.

Reply via email to