vsk added a comment. Wdyt of addressing this problem in a more general way, e.g. in MachineInstruction::eraseFromParent itself? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64500/new/ https://reviews.llvm.org/D64500