[AMDGPU] Skip stack-arg dbg objects while fixing the dead frame indices
authorChristudasan Devadasan <Christudasan.Devadasan@amd.com>
Wed, 2 Nov 2022 13:38:02 +0000 (19:08 +0530)
committerChristudasan Devadasan <Christudasan.Devadasan@amd.com>
Fri, 4 Nov 2022 09:58:35 +0000 (15:28 +0530)
commita8d7ad70aac1148ce7c3458194c322c9536b1409
treef1714af10487d847095d0d9c234edefe5047f86c
parent389cf0adcb0ba2df347e49dcf15f993a4593bdc6
[AMDGPU] Skip stack-arg dbg objects while fixing the dead frame indices

Both SGPR->VGPR and VGPR->AGPR spilling code give a fixup to the
spill frame indices referred in debug instructions so that they
can be entirely removed. We should skip the stack argument debug
objects while looking inside the bitvector with FI as the index
that tracks the spill indices being processed. The stack args will
have negative indices and would crash while accessing the bitvector.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D137277
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
llvm/test/CodeGen/AMDGPU/sgpr-spill-fi-skip-processing-stack-arg-dbg-value.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/vgpr-spill-fi-skip-processing-stack-arg-dbg-value.mir [new file with mode: 0644]