https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119773
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ok, so I've verified that before slsr pass stepping through the IL would
terminate and return 0 from main.
The slsr change is
@@ -64,8 +64,8 @@ int main ()
goto <bb 5>; [73.64%]
<bb 5> [local count: 790703480]:
- _6 = c_lsm.10_19 * -2147483647;
- _7 = _2 + _6;
+ slsr_31 = c_lsm.10_19 * -2147483648;
+ _7 = _5 - slsr_31;
if (_7 >= 0)
goto <bb 6>; [59.00%]
else
where _5 is
_5 = _2 + c_lsm.10_19;
from an earlier bb.
So, this indeed introduces UB which wasn't there, for c_lsm.10_19 value of 1
and _5 being also 1 that is 1 - -2147483648.