OSDN Git Service

[ARM] GlobalISel: Remove dead instruction selection code
authorDiana Picus <diana.picus@linaro.org>
Wed, 17 May 2017 11:39:26 +0000 (11:39 +0000)
committerDiana Picus <diana.picus@linaro.org>
Wed, 17 May 2017 11:39:26 +0000 (11:39 +0000)
We can now generate code for selecting G_ADD, G_SUB and G_MUL. Remove
the hand-written versions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303247 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstructionSelector.cpp

index 8c680cd..b1f0598 100644 (file)
@@ -345,25 +345,10 @@ 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).