[llvm] [ValueTracking] Handle range attributes (PR #85143)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 08:22:43 PDT 2024
================
@@ -2893,6 +2904,18 @@ bool isKnownNonZero(const Value *V, const APInt &DemandedElts, unsigned Depth,
}
}
+ std::optional<ConstantRange> Range;
+ if (const CallBase *CB = dyn_cast<CallBase>(V))
+ Range = CB->getRange();
----------------
nikic wrote:
Could you please rebase over https://github.com/llvm/llvm-project/commit/2cc75aed0925f3c7e8e50b2f4bdc94daac4cb08d and move this part into the CallBase handling code in isKnownNonZeroFromOperator()?
https://github.com/llvm/llvm-project/pull/85143
More information about the llvm-commits
mailing list