https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78115
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- We get now: if (num_2(D) < 0) goto <bb 3>; [41.00%] else goto <bb 4>; [59.00%] <bb 3> [local count: 440234144]: num_3 = num_2(D) - -2147483648; <bb 4> [local count: 1073741824]: # num_1 = PHI <num_2(D)(2), num_3(3)> So something like (psedu code): (simplify (cond (lt @0 integer_zerop) (minus @0 INTEGER_CST@1) @0) (if (TYPE_SIGN (type) == SIGNED && @1 == type_min(type)) (bit_and @0 type_max(type))))