aboutsummaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2007-06-09 04:20:33 +0000
committerNick Lewycky <nicholas@mxc.ca>2007-06-09 04:20:33 +0000
commitae5eb7accf65ee94e22b3d235d466d71268f1e83 (patch)
tree50cae4c537ea5e6e301ec99c2a2171731b1cadf5 /lib/Support
parent1c9f91d7b2653dc730a80f49ac3b6e2b9d6ca236 (diff)
Fix edge case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/ConstantRange.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index 1e2a6375c4..966de801be 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -108,7 +108,7 @@ APInt ConstantRange::getUnsignedMin() const {
APInt ConstantRange::getSignedMax() const {
APInt SignedMax(APInt::getSignedMaxValue(getBitWidth()));
if (!isWrappedSet()) {
- if (getLower().slt(getUpper() - 1))
+ if (getLower().sle(getUpper() - 1))
return getUpper() - 1;
else
return SignedMax;
@@ -130,7 +130,7 @@ APInt ConstantRange::getSignedMax() const {
APInt ConstantRange::getSignedMin() const {
APInt SignedMin(APInt::getSignedMinValue(getBitWidth()));
if (!isWrappedSet()) {
- if (getLower().slt(getUpper() - 1))
+ if (getLower().sle(getUpper() - 1))
return getLower();
else
return SignedMin;