If a saturating add/sub has one constant operand, then we can determine the possible range of outputs it can produce, and simplify an icmp comparison based on that.
I'm implementing this in InstSimplify, with a similar approach to already existing code for binary operators. I previously started out by adding support for this to ConstantRange, which would be able to handle more general cases, but I couldn't figure out which pass would be responsible for the actual simplification.
Assuming canonical IR isn't a valid assumption for InstSimplify because InstSimplify is used as an analysis independently of InstCombine. Even when InstSimplify is called from within InstCombine, it would theoretically be more efficient to handle non-canonical simplifications before doing other transforms in InstCombine.
Do we "internally canonicalize" a constant operand for uadd/sadd to operand 1 here in InstSimplify? If not, we might want to do that too. Also if the existing code for binops doesn't do that, it's probably worth a TODO comment.
In all cases, it's worth varying at least some of the regression tests to prove that we have those non-canonical patterns covered.