[llvm] [AMDGPU] Use correct SlotIndex to calculate live-out register set. (PR #161720)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 04:51:31 PDT 2025


================
@@ -905,33 +907,32 @@ bool GCNRegPressurePrinter::runOnMachineFunction(MachineFunction &MF) {
     OS << ":\n";
 
     SlotIndex MBBStartSlot = LIS.getSlotIndexes()->getMBBStartIdx(&MBB);
-    SlotIndex MBBEndSlot = LIS.getSlotIndexes()->getMBBEndIdx(&MBB);
+    SlotIndex MBBLastSlot = LIS.getSlotIndexes()->getMBBLastIdx(&MBB);
+    bool MBBHasNonDebugInstrs = MBBStartSlot != MBBLastSlot.getBaseIndex();
----------------
arsenm wrote:

I don't understand the name, this doesn't prove there are no debug instructions in the block? 

https://github.com/llvm/llvm-project/pull/161720


More information about the llvm-commits mailing list