summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMInstructionSelector.cpp4
-rw-r--r--llvm/lib/Target/ARM/ARMLegalizerInfo.cpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstructionSelector.cpp b/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
index 0c95c21054d..091f1ff807d 100644
--- a/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
+++ b/llvm/lib/Target/ARM/ARMInstructionSelector.cpp
@@ -98,6 +98,7 @@ private:
unsigned LOAD8;
unsigned ADDrr;
+ unsigned ADDri;
// Used for G_ICMP
unsigned CMPrr;
@@ -300,6 +301,7 @@ ARMInstructionSelector::OpcodeCache::OpcodeCache(const ARMSubtarget &STI) {
STORE_OPCODE(LOAD8, LDRBi12);
STORE_OPCODE(ADDrr, ADDrr);
+ STORE_OPCODE(ADDri, ADDri);
STORE_OPCODE(CMPrr, CMPrr);
STORE_OPCODE(MOVi, MOVi);
@@ -967,7 +969,7 @@ bool ARMInstructionSelector::select(MachineInstr &I,
case G_FRAME_INDEX:
// Add 0 to the given frame index and hope it will eventually be folded into
// the user(s).
- I.setDesc(TII.get(ARM::ADDri));
+ I.setDesc(TII.get(Opcodes.ADDri));
MIB.addImm(0).add(predOps(ARMCC::AL)).add(condCodeOp());
break;
case G_GLOBAL_VALUE:
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
index 5427c7fc0bb..1154d358bd3 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
@@ -138,6 +138,8 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
{s32, p0, 32, 8},
{p0, p0, 32, 8}});
+ getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({p0});
+
auto &PhiBuilder =
getActionDefinitionsBuilder(G_PHI)
.legalFor({s32, p0})
@@ -155,7 +157,6 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
}
getActionDefinitionsBuilder(G_GLOBAL_VALUE).legalFor({p0});
- getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({p0});
if (ST.hasV5TOps()) {
getActionDefinitionsBuilder(G_CTLZ)
OpenPOWER on IntegriCloud