From 961f879ed8642e63db712d0528680a48076fa760 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 13 Mar 2007 20:37:59 +0000 Subject: [PATCH] Zero is always a legal AM immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35087 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMISelLowering.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.34.1