diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-13 20:37:59 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-13 20:37:59 +0000 |
commit | 961f879ed8642e63db712d0528680a48076fa760 (patch) | |
tree | cc927c84cd7ffcd75fd8b9a4cfd7885315db4dcd | |
parent | 1d95816db537242b3ba0e43a0ec96342ad696bf2 (diff) |
Zero is always a legal AM immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35087 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 2038a3e3ae..f23d8aeb37 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -1273,6 +1273,9 @@ ARMTargetLowering::InsertAtEndOfBasicBlock(MachineInstr *MI, /// 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) |