This follows up to D104665 (which added umulo handling alongside the existing uaddo case), and generalizes for the remaining overflow intrinsics.
I went to add analogous handling to LVI, and discovered that LVI already had a more general implementation. Instead, we can port was LVI does to instcombine. :)
A couple of points for review discussion:
- I could have just generated two compares, and let instcombine refold them into the sub form. Not sure which is cleaner here.
- Sanjay was nice enough to improve instcombine such that the profitability of ssub and usub is no longer questionable. Thanks!
clang-format: please reformat the code