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

Valery Pykhtin via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 02:41:59 PDT 2025


================
@@ -467,16 +467,29 @@ class raw_ostream;
       return getMBBRange(mbb).first;
     }
 
-    /// Returns the last index in the given basic block number.
+    /// Returns the index past the last valid index in the given basic block.
     SlotIndex getMBBEndIdx(unsigned Num) const {
       return getMBBRange(Num).second;
     }
 
-    /// Returns the last index in the given basic block.
+    /// Returns the index past the last valid index in the given basic block.
     SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const {
       return getMBBRange(mbb).second;
     }
 
+    /// Returns the last valid index in the given basic block.
----------------
vpykhtin wrote:

Thanks! This one looks better

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


More information about the llvm-commits mailing list