summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
diff options
context:
space:
mode:
authorVadzim Dambrouski <pftbest@gmail.com>2017-05-24 15:08:30 +0000
committerVadzim Dambrouski <pftbest@gmail.com>2017-05-24 15:08:30 +0000
commitb07351f4f87ff31373bd5d8321569736117a7c90 (patch)
tree667549f910d21729dd350dccc22949d12ddb60c8 /llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
parent66f22608377a215174cf06988bc2b710939cd38a (diff)
downloadbcm5719-llvm-b07351f4f87ff31373bd5d8321569736117a7c90.tar.gz
bcm5719-llvm-b07351f4f87ff31373bd5d8321569736117a7c90.zip
[MSP430] Fix PR33050: Don't use ADD16ri to lower FrameIndex.
Use ADDframe pseudo instruction instead. This will fix machine verifier error, and will help to fix PR32146. Differential Revision: https://reviews.llvm.org/D33452 llvm-svn: 303758
Diffstat (limited to 'llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp b/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
index 9600bc28f10..7a3b7a8bd5f 100644
--- a/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
+++ b/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
@@ -127,7 +127,7 @@ MSP430RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
// Fold imm into offset
Offset += MI.getOperand(FIOperandNum + 1).getImm();
- if (MI.getOpcode() == MSP430::ADD16ri) {
+ if (MI.getOpcode() == MSP430::ADDframe) {
// This is actually "load effective address" of the stack slot
// instruction. We have only two-address instructions, thus we need to
// expand it into mov + add
OpenPOWER on IntegriCloud