summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index 219e4e1437..0cef4cce68 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -1370,8 +1370,12 @@ bool ARMTargetLowering::isLegalAddressingMode(const AddrMode &AM,
case 1:
if (Subtarget->isThumb())
return false;
-
+ // FALL THROUGH.
default:
+ // ARM doesn't support any R+R*scale+imm addr modes.
+ if (AM.BaseOffs)
+ return false;
+
int Scale = AM.Scale;
switch (getValueType(Ty)) {
default: return false;