https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80281
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- We need to keep the type of the negation, thus c + (int)-(unsigned)b -> (int)((unsigned) c - (unsigned) b) /* A + (-B) -> A - B */ (simplify (plus:c (convert1? @0) (convert2? (negate @1))) /* Apply STRIP_NOPS on @0 and the negate. */ (if (tree_nop_conversion_p (type, TREE_TYPE (@0)) && tree_nop_conversion_p (type, TREE_TYPE (@1)) && !TYPE_OVERFLOW_SANITIZED (type)) (with { tree t1 = TREE_TYPE (@1); } (convert (minus (convert:t1 @0) @1)))))