aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/ARMFrameLowering.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2018-09-07 09:21:25 +0000
committerTim Northover <tnorthover@apple.com>2018-09-07 09:21:25 +0000
commitbb7d7b3d33e856e8a640d394954a29a59b32a3e6 (patch)
treec2c2afadc9e44ad85496c41f6fb47b6753f07cf9 /llvm/lib/Target/ARM/ARMFrameLowering.cpp
parentd49c32ce3f3f87ae7b04c168438a038a632db0c1 (diff)
downloadllvm-bb7d7b3d33e856e8a640d394954a29a59b32a3e6.zip
llvm-bb7d7b3d33e856e8a640d394954a29a59b32a3e6.tar.gz
llvm-bb7d7b3d33e856e8a640d394954a29a59b32a3e6.tar.bz2
ARM: fix Thumb2 CodeGen for ldrex with folded frame-index.
Because t2LDREX (& t2STREX) were marked as AddrModeNone, but did allow a FrameIndex operand, rewriteT2FrameIndex asserted. This gives them a proper addressing-mode and tells the rewriter about it so that encodable offsets are exploited and others are rejected. Should fix PR38828. llvm-svn: 341642
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFrameLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
index 2f57019..742d5dd 100644
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
@@ -1516,6 +1516,7 @@ static unsigned estimateRSStackSizeLimit(MachineFunction &MF,
break;
case ARMII::AddrMode5:
case ARMII::AddrModeT2_i8s4:
+ case ARMII::AddrModeT2_ldrex:
Limit = std::min(Limit, ((1U << 8) - 1) * 4);
break;
case ARMII::AddrModeT2_i12: