forked from OSchip/llvm-project
fix a valgrind error on copy-constructor-synthesis.cpp, which is caused when
the custom insertion hook deletes the instruction, then we try to set dead flags on it. Neither the code that I added nor the code that was there before was safe. llvm-svn: 99538
This commit is contained in:
parent
a1d0a02713
commit
fc4ec25363
|
@ -617,10 +617,11 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
|
|||
// specific inserter which may returns a new basic block.
|
||||
MBB = TLI->EmitInstrWithCustomInserter(MI, MBB, EM);
|
||||
InsertPos = MBB->end();
|
||||
} else {
|
||||
MBB->insert(InsertPos, MI);
|
||||
return;
|
||||
}
|
||||
|
||||
MBB->insert(InsertPos, MI);
|
||||
|
||||
// Additional results must be an physical register def.
|
||||
if (HasPhysRegOuts) {
|
||||
for (unsigned i = II.getNumDefs(); i < NumResults; ++i) {
|
||||
|
|
Loading…
Reference in New Issue