aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SCCPSolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/SCCPSolver.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SCCPSolver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SCCPSolver.cpp b/llvm/lib/Transforms/Utils/SCCPSolver.cpp
index c65710e..4225e7e 100644
--- a/llvm/lib/Transforms/Utils/SCCPSolver.cpp
+++ b/llvm/lib/Transforms/Utils/SCCPSolver.cpp
@@ -1923,6 +1923,12 @@ void SCCPInstVisitor::handleCallResult(CallBase &CB) {
return (void)mergeInValue(IV, &CB, CopyOfVal);
}
+ if (II->getIntrinsicID() == Intrinsic::vscale) {
+ unsigned BitWidth = CB.getType()->getScalarSizeInBits();
+ const ConstantRange Result = getVScaleRange(II->getFunction(), BitWidth);
+ return (void)mergeInValue(II, ValueLatticeElement::getRange(Result));
+ }
+
if (ConstantRange::isIntrinsicSupported(II->getIntrinsicID())) {
// Compute result range for intrinsics supported by ConstantRange.
// Do this even if we don't know a range for all operands, as we may