summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-05-17 11:56:07 +0000
committerDiana Picus <diana.picus@linaro.org>2017-05-17 11:56:07 +0000
commit36e4ba0f6e78f1c4ea9131dadb96f968019504da (patch)
treebacba8ff7e13ac8b3e50b463ede1b97cbc59c478 /llvm/lib
parent1b8fe5ec8d6fa2f7b085d7f76eab571e851ea468 (diff)
downloadbcm5719-llvm-36e4ba0f6e78f1c4ea9131dadb96f968019504da.tar.gz
bcm5719-llvm-36e4ba0f6e78f1c4ea9131dadb96f968019504da.zip
Revert "[ARM] GlobalISel: Remove dead instruction selection code"
This reverts commit r303247 because the tests are failing on some bots. Sorry! llvm-svn: 303249
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMInstructionSelector.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstructionSelector.cpp b/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
index b1f059835ff..8c680cdf9b4 100644
--- a/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
+++ b/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
@@ -345,10 +345,25 @@ bool ARMInstructionSelector::select(MachineInstr &I) const {
I.setDesc(TII.get(COPY));
return selectCopy(I, TII, MRI, TRI, RBI);
}
+ case G_ADD:
case G_GEP:
I.setDesc(TII.get(ARM::ADDrr));
MIB.add(predOps(ARMCC::AL)).add(condCodeOp());
break;
+ case G_SUB:
+ I.setDesc(TII.get(ARM::SUBrr));
+ MIB.add(predOps(ARMCC::AL)).add(condCodeOp());
+ break;
+ case G_MUL:
+ if (TII.getSubtarget().hasV6Ops()) {
+ I.setDesc(TII.get(ARM::MUL));
+ } else {
+ assert(TII.getSubtarget().useMulOps() && "Unsupported target");
+ I.setDesc(TII.get(ARM::MULv5));
+ MIB->getOperand(0).setIsEarlyClobber(true);
+ }
+ MIB.add(predOps(ARMCC::AL)).add(condCodeOp());
+ break;
case G_FRAME_INDEX:
// Add 0 to the given frame index and hope it will eventually be folded into
// the user(s).
OpenPOWER on IntegriCloud