summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 732f5c03d4e..0c2a3a86597 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -349,8 +349,7 @@ bool ConstantRange::isWrappedSet() const {
}
bool ConstantRange::isSignWrappedSet() const {
- return contains(APInt::getSignedMaxValue(getBitWidth())) &&
- contains(APInt::getSignedMinValue(getBitWidth()));
+ return Lower.sgt(Upper) && !Upper.isMinSignedValue();
}
APInt ConstantRange::getSetSize() const {
OpenPOWER on IntegriCloud