[llvm] [RegisterCoalescer] Deferring deletion of instructions in `ErasedInstrs` until the end of an iteration (PR #79820)
Quentin Dian via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 22:34:03 PST 2024
DianQK wrote:
> > > > Also can you add the test from #71178 and #73519
> > >
> > >
> > > Hmm, this PR doesn't fix it. This test case isn't stable, and I can't test it with RegisterCoalescer.
> >
> >
> > I think it's a similar but different issue.
>
> I think it's the same; it's from relying on the delete inst pointers from removePartialRedundancy
I found out why. It's a very specific case.
We erased an instruction in `coalesceLocals` and then created a new instruction because it was the same address, and we successfully deleted the record at `ErasedInstrs`. After that, we erased the new instruction again.
Finally, we will lose this record in `while (copyCoalesceWorkList(WorkList))` since `CurrentErasedInstrs` only records one iteration.
https://github.com/llvm/llvm-project/pull/79820
More information about the llvm-commits
mailing list