[llvm-commits] CVS: llvm/lib/Support/ConstantRange.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Jun 8 21:20:55 PDT 2007
Changes in directory llvm/lib/Support:
ConstantRange.cpp updated: 1.45 -> 1.46
---
Log message:
Fix edge case.
---
Diffs of the changes: (+2 -2)
ConstantRange.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Support/ConstantRange.cpp
diff -u llvm/lib/Support/ConstantRange.cpp:1.45 llvm/lib/Support/ConstantRange.cpp:1.46
--- llvm/lib/Support/ConstantRange.cpp:1.45 Thu Apr 26 11:40:25 2007
+++ llvm/lib/Support/ConstantRange.cpp Fri Jun 8 23:20:33 2007
@@ -108,7 +108,7 @@
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::getSignedMin() const {
APInt SignedMin(APInt::getSignedMinValue(getBitWidth()));
if (!isWrappedSet()) {
- if (getLower().slt(getUpper() - 1))
+ if (getLower().sle(getUpper() - 1))
return getLower();
else
return SignedMin;
More information about the llvm-commits
mailing list