AMDGPU: Fix not adding exec to defs of cmpx instruction pseudos
[oota-llvm.git] / lib / Target / AMDGPU / SIFixSGPRLiveRanges.cpp
index 5f25c69fde057baf84780965dd776ae7663e32a1..abe331477ad6474dbaa52ade225f0084997879a4 100644 (file)
@@ -114,6 +114,7 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
   const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
   const SIRegisterInfo *TRI = static_cast<const SIRegisterInfo *>(
       MF.getSubtarget().getRegisterInfo());
+  bool MadeChange = false;
 
   MachinePostDominatorTree *PDT = &getAnalysis<MachinePostDominatorTree>();
   std::vector<std::pair<unsigned, LiveRange *>> SGPRLiveRanges;
@@ -209,6 +210,8 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
                 TII->get(AMDGPU::SGPR_USE))
         .addReg(Reg, RegState::Implicit);
 
+      MadeChange = true;
+
       SlotIndex SI = LIS->InsertMachineInstrInMaps(NCDSGPRUse);
       LIS->extendToIndices(*LR, SI.getRegSlot());
 
@@ -221,5 +224,5 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
     }
   }
 
-  return false;
+  return MadeChange;
 }