https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66739
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- I am testing Index: gcc/match.pd =================================================================== --- gcc/match.pd (revision 225453) +++ gcc/match.pd (working copy) @@ -1336,8 +1353,9 @@ (define_operator_list CBRT BUILT_IN_CBRT attempts to synthetize ABS_EXPR. */ (for cmp (eq ne) (simplify - (cmp (minus @0 @1) integer_zerop) - (cmp @0 @1))) + (cmp (minus@2 @0 @1) integer_zerop) + (if (single_use (@2)) + (cmp @0 @1)))) /* Transform comparisons of the form X * C1 CMP 0 to X CMP 0 in the signed arithmetic case. That form is created by the compiler