diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2007-06-09 04:20:33 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2007-06-09 04:20:33 +0000 |
commit | d18b16034a35bdcdbb9eb3ed9eb8d4f2fadbf502 (patch) | |
tree | 7e6ce99411406a3953cd10506a1f07499dc918bd /llvm/lib/Support/ConstantRange.cpp | |
parent | 2117d1f20eacd48c91a16392367d2e648b135699 (diff) | |
download | bcm5719-llvm-d18b16034a35bdcdbb9eb3ed9eb8d4f2fadbf502.tar.gz bcm5719-llvm-d18b16034a35bdcdbb9eb3ed9eb8d4f2fadbf502.zip |
Fix edge case.
llvm-svn: 37532
Diffstat (limited to 'llvm/lib/Support/ConstantRange.cpp')
-rw-r--r-- | llvm/lib/Support/ConstantRange.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp index 1e2a6375c45..966de801be0 100644 --- a/llvm/lib/Support/ConstantRange.cpp +++ b/llvm/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; |