[llvm-commits] [llvm] r112300 - /llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Bob Wilson
bob.wilson at apple.com
Fri Aug 27 14:44:35 PDT 2010
Author: bwilson
Date: Fri Aug 27 16:44:35 2010
New Revision: 112300
URL: http://llvm.org/viewvc/llvm-project?rev=112300&view=rev
Log:
Unsigned value cannot be < 0.
Modified:
llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp?rev=112300&r1=112299&r2=112300&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Fri Aug 27 16:44:35 2010
@@ -409,7 +409,7 @@
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 @@
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;
More information about the llvm-commits
mailing list