AMDGPU: Fix adding redundant m0 uses
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 21 Oct 2015 22:37:51 +0000 (22:37 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 21 Oct 2015 22:37:51 +0000 (22:37 +0000)
BuildMI already adds these since they are defined correctly now.

llvm-svn: 250961

llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp

index 72ed195..126f624 100644 (file)
@@ -438,7 +438,6 @@ void SILowerControlFlowPass::IndirectSrc(MachineInstr &MI) {
   MachineInstr *MovRel =
     BuildMI(*MBB.getParent(), DL, TII->get(AMDGPU::V_MOVRELS_B32_e32), Dst)
             .addReg(Reg)
-            .addReg(AMDGPU::M0, RegState::Implicit)
             .addReg(Vec, RegState::Implicit);
 
   LoadM0(MI, MovRel, Off);
@@ -460,7 +459,6 @@ void SILowerControlFlowPass::IndirectDst(MachineInstr &MI) {
     BuildMI(*MBB.getParent(), DL, TII->get(AMDGPU::V_MOVRELD_B32_e32))
             .addReg(Reg, RegState::Define)
             .addReg(Val)
-            .addReg(AMDGPU::M0, RegState::Implicit)
             .addReg(Dst, RegState::Implicit);
 
   LoadM0(MI, MovRel, Off);