summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2015-03-20 17:20:07 +0000
committerJohn Brawn <john.brawn@arm.com>2015-03-20 17:20:07 +0000
commit1f26a47630b190056716b0a3ba062f230d255bcf (patch)
tree2f82b305f0a989ea7a1293659f668f21990b1e5b /llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
parentc403a1ce323b9a20fcfd928152da8c59321d2a75 (diff)
downloadbcm5719-llvm-1f26a47630b190056716b0a3ba062f230d255bcf.tar.gz
bcm5719-llvm-1f26a47630b190056716b0a3ba062f230d255bcf.zip
[ARM] Fix handling of thumb1 out-of-range frame offsets
LocalStackSlotPass assumes that isFrameOffsetLegal doesn't change its answer when the base register changes. Unfortunately this isn't true in thumb1, where SP-based loads allow a larger offset than non-SP-based loads, and this causes the base register reuse code to generate instructions that are unencodable, causing an assertion failure. Solve this by adding a BaseReg parameter to isFrameOffsetLegal, which ARMBaseRegisterInfo can then make use of to give the correct answer. Differential Revision: http://reviews.llvm.org/D8419 llvm-svn: 232825
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseRegisterInfo.h')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
index af2b9a4c469..fdc1ef9432c 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
@@ -143,7 +143,7 @@ public:
int64_t Offset) const override;
void resolveFrameIndex(MachineInstr &MI, unsigned BaseReg,
int64_t Offset) const override;
- bool isFrameOffsetLegal(const MachineInstr *MI,
+ bool isFrameOffsetLegal(const MachineInstr *MI, unsigned BaseReg,
int64_t Offset) const override;
bool cannotEliminateFrame(const MachineFunction &MF) const;
OpenPOWER on IntegriCloud