[Bug tree-optimization/105903] Missed optimization for __synth3way
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 8 23:53:22 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105903
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |tree-optimization
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Severity|normal |enhancement
Last reconfirmed| |2022-06-08
Keywords| |missed-optimization
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Currently we have inside phiopt4
if (_5 < _6)
goto <bb 4>; [50.00%]
else
goto <bb 3>; [50.00%]
<bb 3> [local count: 536870913]:
_9 = _5 > _6;
<bb 4> [local count: 1073741824]:
# prephitmp_10 = PHI <0(2), _9(3)>
That is:
(_5 < _6) ? 0 : (_5 > _6)
Which I think can be optimized to just:
(_5 > _6)
More information about the Gcc-bugs
mailing list