mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-15 16:38:41 +00:00
Fix edge case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c9f91d7b2
commit
ae5eb7accf
@ -108,7 +108,7 @@ APInt ConstantRange::getUnsignedMin() const {
|
|||||||
APInt ConstantRange::getSignedMax() const {
|
APInt ConstantRange::getSignedMax() const {
|
||||||
APInt SignedMax(APInt::getSignedMaxValue(getBitWidth()));
|
APInt SignedMax(APInt::getSignedMaxValue(getBitWidth()));
|
||||||
if (!isWrappedSet()) {
|
if (!isWrappedSet()) {
|
||||||
if (getLower().slt(getUpper() - 1))
|
if (getLower().sle(getUpper() - 1))
|
||||||
return getUpper() - 1;
|
return getUpper() - 1;
|
||||||
else
|
else
|
||||||
return SignedMax;
|
return SignedMax;
|
||||||
@ -130,7 +130,7 @@ APInt ConstantRange::getSignedMax() const {
|
|||||||
APInt ConstantRange::getSignedMin() const {
|
APInt ConstantRange::getSignedMin() const {
|
||||||
APInt SignedMin(APInt::getSignedMinValue(getBitWidth()));
|
APInt SignedMin(APInt::getSignedMinValue(getBitWidth()));
|
||||||
if (!isWrappedSet()) {
|
if (!isWrappedSet()) {
|
||||||
if (getLower().slt(getUpper() - 1))
|
if (getLower().sle(getUpper() - 1))
|
||||||
return getLower();
|
return getLower();
|
||||||
else
|
else
|
||||||
return SignedMin;
|
return SignedMin;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user