OSDN Git Service

ARM: fix Thumb2 CodeGen for ldrex with folded frame-index.
authorTim Northover <tnorthover@apple.com>
Fri, 7 Sep 2018 09:21:25 +0000 (09:21 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 7 Sep 2018 09:21:25 +0000 (09:21 +0000)
commit361c297c9dc14145cca04f53c70760567e2e25b6
treeff6eb5d530e9e8c584705bb7158984e373d72192
parentf774071018b07c3594dd0d48557d7b46736227f1
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341642 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMFrameLowering.cpp
lib/Target/ARM/ARMInstrFormats.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
lib/Target/ARM/Thumb2InstrInfo.cpp
test/CodeGen/ARM/ldrex-frame-size.ll [new file with mode: 0644]
test/CodeGen/ARM/ldstrex.ll