From: Evan Cheng Date: Tue, 13 Mar 2007 20:37:59 +0000 (+0000) Subject: Zero is always a legal AM immediate. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=961f879ed8642e63db712d0528680a48076fa760;p=oota-llvm.git Zero is always a legal AM immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35087 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 2038a3e3aef..f23d8aeb37e 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)