[llvm] [ValueTracking] Handle intrinsics in `computeConstantRange` (PR #100870)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 27 06:37:09 PDT 2024
================
@@ -9687,12 +9687,12 @@ ConstantRange llvm::computeConstantRange(const Value *V, bool ForSigned,
unsigned Depth) {
assert(V->getType()->isIntOrIntVectorTy() && "Expected integer instruction");
- if (Depth == MaxAnalysisRecursionDepth)
- return ConstantRange::getFull(V->getType()->getScalarSizeInBits());
-
if (auto *C = dyn_cast<Constant>(V))
return C->toConstantRange();
+ if (Depth == MaxAnalysisRecursionDepth)
----------------
dtcxzyw wrote:
Related test: `@immarg_test`
https://github.com/llvm/llvm-project/pull/100870
More information about the llvm-commits
mailing list