Unsigned value cannot be < 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson 2010-08-27 21:44:35 +00:00
parent 68ff776661
commit 3d38e8364a

View File

@ -409,7 +409,7 @@ static inline bool isMatchingDecrement(MachineInstr *MI, unsigned Base,
return false;
// Make sure the offset fits in 8 bits.
if (Bytes <= 0 || (Limit && Bytes >= Limit))
if (Bytes == 0 || (Limit && Bytes >= Limit))
return false;
unsigned Scale = (MI->getOpcode() == ARM::tSUBspi) ? 4 : 1; // FIXME
@ -433,7 +433,7 @@ static inline bool isMatchingIncrement(MachineInstr *MI, unsigned Base,
MI->getOpcode() != ARM::ADDri)
return false;
if (Bytes <= 0 || (Limit && Bytes >= Limit))
if (Bytes == 0 || (Limit && Bytes >= Limit))
// Make sure the offset fits in 8 bits.
return false;