llvm-project
738e8350 - [ValueTracking] Extend computeConstantRange for add/sub, sext/zext/trunc

Commit
59 days ago
[ValueTracking] Extend computeConstantRange for add/sub, sext/zext/trunc Recursively compute operand ranges for add/sub and propagate ranges through sext/zext/trunc. For add/sub, the computed range is intersected with any existing range from setLimitsForBinOp, and NSW/NUW flags are used via addWithNoWrap/ subWithNoWrap to tighten bounds. The motivation is to enable further folding of reduce.add expressions in comparisons, where the result range can be bounded by the input element ranges.
Author
Committer
Parents
Loading