[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp

Evan Cheng evan.cheng at apple.com
Tue Mar 13 13:38:16 PDT 2007



Changes in directory llvm/lib/Target/ARM:

ARMISelLowering.cpp updated: 1.21 -> 1.22
---
Log message:

Zero is always a legal AM immediate.

---
Diffs of the changes:  (+3 -0)

 ARMISelLowering.cpp |    3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.21 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.22
--- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.21	Mon Mar 12 18:30:29 2007
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp	Tue Mar 13 15:37:59 2007
@@ -1273,6 +1273,9 @@
 /// as the offset of the target addressing mode for load / store of the
 /// given type.
 bool ARMTargetLowering::isLegalAddressImmediate(int64_t V,const Type *Ty) const{
+  if (V == 0)
+    return true;
+
   MVT::ValueType VT = getValueType(Ty);
   if (Subtarget->isThumb()) {
     if (V < 0)






More information about the llvm-commits mailing list