https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111574
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What is happening is: ``` if (_1 != 0) goto <bb 6>; [INV] else goto <bb 7>; [INV] <bb 6> : _28 = (uint8_t) _1; // predicted unlikely by early return (on trees) predictor. goto <bb 8>; [INV] <bb 7> : _7 = func_34 (0); <bb 8> : # _17 = PHI <_28(6), 0(7)> ``` Is being converted into: ``` if (_1 != 0) goto <bb 6>; [INV] else goto <bb 7>; [INV] <bb 6> : // predicted unlikely by early return (on trees) predictor. goto <bb 8>; [INV] <bb 7> : _7 = func_34 (0); <bb 8> : # _new = PHI <_1(6), 0(7)> _17 = (uint8_t) _new; ``` And then incorrectly into: ``` _7 = func_34 (0); _17 = (uint8_t) _1; ``` Removing the if statement. The same way as the other bug is being incorrectly handled too.