Index: lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp =================================================================== --- lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp +++ lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp @@ -114,6 +114,7 @@ const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo(); const SIRegisterInfo *TRI = static_cast( MF.getSubtarget().getRegisterInfo()); + bool MadeChange = false; MachinePostDominatorTree *PDT = &getAnalysis(); std::vector> SGPRLiveRanges; @@ -209,6 +210,8 @@ 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 @@ } } - return false; + return MadeChange; }