[RegAllocFast] Handle new debug values for spills
authorJosh Stone <jistone@redhat.com>
Wed, 4 Jan 2023 00:04:45 +0000 (16:04 -0800)
committerJosh Stone <jistone@redhat.com>
Fri, 6 Jan 2023 04:41:11 +0000 (20:41 -0800)
commit87f57f459e7acbb00a6ca4ee6dec6014c5a97e07
treeafdacfb140533d02a8582b797fd0c4aea4d978ad
parent143ec502e9859141e9d340ed59046dad0fc4ee6f
[RegAllocFast] Handle new debug values for spills

These new debug values get inserted after the place where the spill
happens, which means they won't be reached by the reverse traversal of
basic block instructions. This would crash or fail assertions if they
contained any virtual registers to be replaced. We can manually handle
the new debug values right away to resolve this.

Fixes https://github.com/llvm/llvm-project/issues/59172

Reviewed By: StephenTozer

Differential Revision: https://reviews.llvm.org/D139590
llvm/lib/CodeGen/RegAllocFast.cpp
llvm/test/CodeGen/PowerPC/regalloc-fast-debug-spill.ll [new file with mode: 0644]