https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118805
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-02-09
Ever confirmed|0 |1
CC| |aoliva at gcc dot gnu.org
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Before ifcombine:
```
a.0_1 = a;
t_4 = (int) a.0_1;
if (t_4 < 0)
goto <bb 3>; [41.00%]
else
goto <bb 5>; [59.00%]
<bb 3> [local count: 440234144]:
a.1_2 = a;
if (a.1_2 == 255)
goto <bb 4>; [0.00%]
else
goto <bb 5>; [100.00%]
```
After:
```
optimizing two comparisons to a.0_1 == 255
...
a.0_1 = a;
t_4 = (int) a.0_1;
a.1_2 = a;
if (a.0_1 == 255)
goto <bb 3>; [0.00%]
else
goto <bb 4>; [100.00%]
```