https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115011
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |104292
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The easiest way to fix this is to optimize t_12 in:
```
_1 = f_10(D) == 0;
_2 = (int) _1; //[0,1]
x.0_3 = x;
_4 = (int) x.0_3; //[0,1]
_5 = _2 + _4;
t_12 = _5 != 0;
_7 = f_10(D) != 0;
_14 = _7 | t_12;
```
Into:
``
x.0_3 = x;
_1 = f_10(D) == 0;
t_12 = _1 | x.0_3; // <-- this
_7 = f_10(D) != 0;
_14 = _7 | t_12;
```
Which then will be optimized into true as _1 and _7 are opposites.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104292
[Bug 104292] (bool)(bool0 + bool1) should be simplified into bool0 | bool1