summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/IR/ConstantRange.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 63a6494fc17..e9bdf419352 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -1348,8 +1348,8 @@ ConstantRange ConstantRange::sshl_sat(const ConstantRange &Other) const {
APInt Min = getSignedMin(), Max = getSignedMax();
APInt ShAmtMin = Other.getUnsignedMin(), ShAmtMax = Other.getUnsignedMax();
- APInt NewL = Min.sshl_sat(isAllNonNegative() ? ShAmtMin : ShAmtMax);
- APInt NewU = Max.sshl_sat(isAllNegative() ? ShAmtMin : ShAmtMax) + 1;
+ APInt NewL = Min.sshl_sat(Min.isNonNegative() ? ShAmtMin : ShAmtMax);
+ APInt NewU = Max.sshl_sat(Max.isNegative() ? ShAmtMin : ShAmtMax) + 1;
return getNonEmpty(std::move(NewL), std::move(NewU));
}
OpenPOWER on IntegriCloud