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;
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;