llvm-project
2cff995e - [AMDGPU] Fix crash with dead frame indices in debug values (#183297)

Commit
9 hours ago
[AMDGPU] Fix crash with dead frame indices in debug values (#183297) When spill slots are eliminated (VGPR-to-AGPR, SGPR-to-VGPR lanes), debug values referencing these frame indices were not always properly cleaned up. This caused an assertion failure in getObjectOffset() when PrologEpilogInserter tried to access the offset of a dead frame object. The existing debug fixup code in SIFrameLowering and SILowerSGPRSpills had two limitations: 1. It only checked one operand position, but DBG_VALUE_LIST instructions can have multiple debug operands with frame indices. 2. It didn't handle all types of dead frame indices uniformly. Fix by centralizing debug info cleanup in removeDeadFrameIndices(), which already knows all frame indices being removed. This iterates over all debug operands using MI.debug_operands(). Assisted-by: Claude Code.
Author
Parents
Loading