[PATCH] D105019: [RegisterCoalescer] Avoid coalescing erased Copy
guopeilin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 28 06:07:49 PDT 2021
guopeilin added a comment.
Sometimes the `CurrList` may have two identical instructions that will be coalesced later. Once the first one coalesced, it will be removed from its parent, this will make the second identical instruction become illegal which `getParent` will be a nullptr. In this case, we should avoid coalescing erased instruction.<br>
The test case will trigger an Assertion like the following:
llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:359: llvm::Register llvm::MachineOperand::getReg() const: Assertion `isReg() && "This is not a register operand!"' failed.
Also recorded in Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=50919
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105019/new/
https://reviews.llvm.org/D105019
More information about the llvm-commits
mailing list