radeon/llvm: Remove AMDIL MOVE* instructions
authorTom Stellard <thomas.stellard@amd.com>
Wed, 6 Jun 2012 00:48:41 +0000 (20:48 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 6 Jun 2012 17:46:04 +0000 (13:46 -0400)
src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp
src/gallium/drivers/radeon/AMDILISelLowering.cpp
src/gallium/drivers/radeon/AMDILInstrInfo.cpp
src/gallium/drivers/radeon/AMDILInstrInfo.h
src/gallium/drivers/radeon/AMDILInstructions.td

index d7b08b0aa772afc0d88ec979f991ea0428a94f1c..4e70a54145b3da1535c45fcba97b44059cbbc971 100644 (file)
@@ -163,7 +163,7 @@ SDNode *AMDILDAGToDAGISel::Select(SDNode *N) {
       if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(N)) {
         unsigned int FI = FIN->getIndex();
         EVT OpVT = N->getValueType(0);
-        unsigned int NewOpc = AMDIL::MOVE_i32;
+        unsigned int NewOpc = AMDIL::COPY;
         SDValue TFI = CurDAG->getTargetFrameIndex(FI, MVT::i32);
         return CurDAG->SelectNodeTo(N, NewOpc, OpVT, TFI);
       }
index 1c5c9ba8266b8619377782264258ff6b58542e7a..a0be1f45f41e5a7167050432bb2ac6c1220f75e5 100644 (file)
@@ -59,8 +59,6 @@ getConversionNode(SelectionDAG &DAG, SDValue& Src, SDValue& Dst, bool asType)
   } else if (svt.isInteger() && dvt.isInteger()) {
     if (!svt.bitsEq(dvt)) {
       Src = DAG.getSExtOrTrunc(Src, DL, dvt);
-    } else {
-      Src = DAG.getNode(AMDILISD::MOVE, DL, dvt, Src);
     }
   } else if (svt.isInteger()) {
     unsigned opcode = (asType) ? ISDBITCAST : ISD::SINT_TO_FP;
index 5143f3fd8fc7def0903f41048259ce7bc56f9856..11a6516a2c3b1c60da28dfccf1d72f5e9572990f 100644 (file)
@@ -243,21 +243,6 @@ MachineBasicBlock::iterator skipFlowControl(MachineBasicBlock *MBB) {
   return MBB->end();
 }
 
-void
-AMDILInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
-                            MachineBasicBlock::iterator MI, DebugLoc DL,
-                            unsigned DestReg, unsigned SrcReg,
-                            bool KillSrc) const
-{
-  BuildMI(MBB, MI, DL, get(AMDIL::MOVE_v4i32), DestReg)
-    .addReg(SrcReg, getKillRegState(KillSrc));
-  return;
-#if 0
-  DEBUG(dbgs() << "Cannot copy " << RI.getName(SrcReg)
-               << " to " << RI.getName(DestReg) << '\n');
-  abort();
-#endif
-}
 void
 AMDILInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
                                     MachineBasicBlock::iterator MI,
index 7ea88348a9a77427a5018c5606543aac6980e933..bff729b4685832073ec3b4ecc68880c6f811b1ae 100644 (file)
@@ -77,7 +77,7 @@ public:
   virtual void copyPhysReg(MachineBasicBlock &MBB,
                            MachineBasicBlock::iterator MI, DebugLoc DL,
                            unsigned DestReg, unsigned SrcReg,
-                           bool KillSrc) const;
+                           bool KillSrc) const = 0;
 
   void storeRegToStackSlot(MachineBasicBlock &MBB,
                            MachineBasicBlock::iterator MI,
index afddefebce6bdc81ce3e3326fa37fa0a8b6dc34f..ec3f8cbe31b70a30b2f516c97be94b0551b9ed47 100644 (file)
@@ -10,7 +10,6 @@
 // Operations in this file are generic to all data types
 // This opcode has custom swizzle pattern encoded in Swizzle Encoder
 let isReMaterializable = 1, isAsCheapAsAMove = 1 in {
-  defm MOVE       : UnaryOpMC<IL_OP_MOV, IL_mov>;
   defm PHIMOVE    : UnaryOpMC<IL_OP_MOV, IL_phimov>;
 }
 defm CMOV       : BinaryOpMC<IL_OP_CMOV, IL_cmov>;