summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-13 20:37:59 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-13 20:37:59 +0000
commit507eefa75714cbff717106f4a42cda8cd7422ee3 (patch)
tree67cab19585c19cdccf689b28bc098626933165cb /llvm/lib/Target
parentb5eb932c93d64e82a8a90e9df336f9317eb0e409 (diff)
downloadbcm5719-llvm-507eefa75714cbff717106f4a42cda8cd7422ee3.tar.gz
bcm5719-llvm-507eefa75714cbff717106f4a42cda8cd7422ee3.zip
Zero is always a legal AM immediate.
llvm-svn: 35087
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 2038a3e3aef..f23d8aeb37e 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud