[GlobalISel] Fix a combine causing DBG_VALUE with dangling vregs.
authorAmara Emerson <amara@apple.com>
Sat, 7 Aug 2021 08:37:24 +0000 (01:37 -0700)
committerAmara Emerson <amara@apple.com>
Sat, 7 Aug 2021 08:41:02 +0000 (01:41 -0700)
commit4c2e01232cfc397a438eab57a8f9e3a849a6e9f1
tree529de65f9d4800a6e1e8e2b038c0ae8a1cf32e81
parentbfb77364d0be8a5b159cdcf4eaf8e7a720802e89
[GlobalISel] Fix a combine causing DBG_VALUE with dangling vregs.

We should use MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval()
instead of eraseFromParent().

We should probably use that in other places too but fix this issue which
affects clang bootstrap builds for now.
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-shift-of-shifted-dbg-value-fallback.ll [new file with mode: 0644]