https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96674
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- /* x < y || x == XXX_MIN --> x <= y - 1 */ (simplify (bit_ior (eq @1 min_value) (lt @0 @1)) (if (INTEGRAL_TYPE_P (TREE_TYPE (@1)) && TYPE_OVERFLOW_WRAPS (TREE_TYPE (@1))) (le @0 (minus @1 { build_int_cst (TREE_TYPE (@1), 1); })))) The comment doesn't match what the simplification implements (x == XXX_MIN should be y == XXX_MIN). Furthermore, bit_ior is commutative and for the optimization no specific order is needed, so probably bit_ior:c is needed. Also, the optimization doesn't seem to be worth if either eq or lt has multiple uses, so both should have :s suffixes. When x < y || y == min can be simplified into x <= y - 1, can't its negation, i.e. x >= y && y != min be simplified into x > y - 1 ? And agree on the noipa attribute, most of the tests you're citing just predate the noipa attribute. We had noinline for many years, later added noclone and have been using noinline, noclone and when we started adding further IPA optimizations, noipa has been added.