This is related to the discussion in D142071. It can solve the regresi8 and i16 are not using overflow.
Reduce the number of zero extension in D142071structions.
I copied llvm/tests/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll to test shouldFormOverflowOp.
Usually MathUsed is Add->hasNUsesOrMore(2), for optbranch_64, the add just has two uses.
MathUsed is true. If we could check these use must come from the same BB, perhaps MathUsed could be false.To reduce the uncertainty of the unknown,
most of the checks of the virtual function are kept