Adds support for the uadd.sat family of intrinsics in LVI, based on ConstantRange methods from D60946.
Details
Diff Detail
Event Timeline
Still not any more familiar with CVP, but this looks rather identical to the solveBlockValueOverflowIntrinsic() change, so LG.
Up to you if you want to wait for one more signoff (@spatel ?)
llvm/lib/Analysis/LazyValueInfo.cpp | ||
---|---|---|
1122 | Have you considered adding a SaturatingInst base class, much like WithOverflowInst; |
llvm/lib/Analysis/LazyValueInfo.cpp | ||
---|---|---|
1122 | Yeah, that might make sense. Having it (possibly even a common base class with WithOverflowInst) would be useful to extend https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp#L402 to saturating math. |
Have you considered adding a SaturatingInst base class, much like WithOverflowInst;
and/or saturatingBinaryOp, much like binaryOp, to ConstantRange?
I think that might potentially be a bit cleaner overall.
(Not for this patch)