[Bug tree-optimization/56369] Missed opportunity to combine comparisons with zero

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 26 21:42:30 GMT 2021


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |7.0
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 7+ by r7-1411.

Basically it does:
status1 = old_status < 0 ? old_status : 0;
status1 >= 0

And converts the condition into "old_status >= 0" and then the MIN_EXPR can be
sinked.


More information about the Gcc-bugs mailing list