diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-08-27 21:44:35 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-08-27 21:44:35 +0000 |
commit | 3d38e8364a542abab6ca3d3aed658cf60d3112b4 (patch) | |
tree | 79b680e14dd822b6c79a0dfb21ed1206a72f4f79 /lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
parent | 68ff776661be00138a9a5c9cce731a137e1dd2bb (diff) |
Unsigned value cannot be < 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index db580fbf7b..2dbfb60773 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -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; |