mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Fix edge case.
llvm-svn: 37532
This commit is contained in:
parent
859dab4bda
commit
e03bd9ddbb
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user