This modifies the preconditions of TypePromotion's isSafeWrap method, to allow it to work from all constants from the ICmp. Using the code:
%a = add %x, C1 %c = icmp ult %a, C2
According to Alive, we can prove that is equivalent to icmp ult (add zext(%x), sext(C1)), zext(C2) given C1 <=s 0 and C1 >s C2.
https://alive2.llvm.org/ce/z/CECYZB
And can prove icmp ult (add zext(%x), sext(C1)), sext(C2) given C1 <=s 0 and C1 <=s C2.
https://alive2.llvm.org/ce/z/KKgyeL
The PrepareWrappingAdds method was removed, and the constants are now altered to sext or zext directly as required by the above methods.
Good to change the function name before committing, same for the other altered test.