[llvm] [ValueTracking] Extend computeConstantRange for add/sub, sext/zext/trunc (PR #181110)
Mikhail Gudim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 12 07:09:04 PST 2026
================
@@ -10242,6 +10242,34 @@ ConstantRange llvm::computeConstantRange(const Value *V, bool ForSigned,
// TODO: Return ConstantRange.
setLimitsForBinOp(*BO, Lower, Upper, IIQ, ForSigned);
CR = ConstantRange::getNonEmpty(Lower, Upper);
+ if (BO->getOpcode() == Instruction::Add ||
----------------
mgudim wrote:
could we add "disjoint or" which acts as an "add" here too?
https://github.com/llvm/llvm-project/pull/181110
More information about the llvm-commits
mailing list