summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-24 17:46:13 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-24 17:46:13 +0000
commit1b8457a84c87452c7bb99fa210b7e3475f727d80 (patch)
tree7010ea9dbd8b7f5bcecdce51e554406a2e62a034 /llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
parentcb2921dbd39f66388080f5e7914cd0bc33f1533c (diff)
downloadbcm5719-llvm-1b8457a84c87452c7bb99fa210b7e3475f727d80.tar.gz
bcm5719-llvm-1b8457a84c87452c7bb99fa210b7e3475f727d80.zip
Thumb1 ADD/SUB SP instructions are predicable in Thumb2 mode.
Add the predicate operand to the instructions. Update the back end accordingly where the instructions are used. Restrict the SP operands to actually only be SP, as otherwise these break assembly parsing for the normal instruction variants. llvm-svn: 138445
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2SizeReduction.cpp')
-rw-r--r--llvm/lib/Target/ARM/Thumb2SizeReduction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp b/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
index 130be9ac7de..89a155c5a7f 100644
--- a/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
+++ b/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
@@ -507,6 +507,7 @@ Thumb2SizeReduce::ReduceSpecial(MachineBasicBlock &MBB, MachineInstr *MI,
.addOperand(MI->getOperand(0))
.addOperand(MI->getOperand(1))
.addImm(Imm / 4); // The tADDrSPi has an implied scale by four.
+ AddDefaultPred(MIB);
// Transfer MI flags.
MIB.setMIFlags(MI->getFlags());
OpenPOWER on IntegriCloud