[ARM GlobalISel] Style fix. NFCI
Add the opcode for ADDrr / t2ADDrr to the Opcode cache, as we did for
all other opcodes where the handling is otherwise the same between arm
mode and thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354115 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMInstructionSelector.cpp b/lib/Target/ARM/ARMInstructionSelector.cpp
index 3030e21..0c95c21 100644
--- a/lib/Target/ARM/ARMInstructionSelector.cpp
+++ b/lib/Target/ARM/ARMInstructionSelector.cpp
@@ -97,6 +97,8 @@
unsigned STORE8;
unsigned LOAD8;
+ unsigned ADDrr;
+
// Used for G_ICMP
unsigned CMPrr;
unsigned MOVi;
@@ -297,6 +299,8 @@
STORE_OPCODE(STORE8, STRBi12);
STORE_OPCODE(LOAD8, LDRBi12);
+ STORE_OPCODE(ADDrr, ADDrr);
+
STORE_OPCODE(CMPrr, CMPrr);
STORE_OPCODE(MOVi, MOVi);
STORE_OPCODE(MOVCCi, MOVCCi);
@@ -957,7 +961,7 @@
return selectShift(ARM_AM::ShiftOpc::lsl, MIB);
}
case G_GEP:
- I.setDesc(TII.get(STI.isThumb2() ? ARM::t2ADDrr : ARM::ADDrr));
+ I.setDesc(TII.get(Opcodes.ADDrr));
MIB.add(predOps(ARMCC::AL)).add(condCodeOp());
break;
case G_FRAME_INDEX: