mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99538 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -617,10 +617,11 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
|
|||||||
// specific inserter which may returns a new basic block.
|
// specific inserter which may returns a new basic block.
|
||||||
MBB = TLI->EmitInstrWithCustomInserter(MI, MBB, EM);
|
MBB = TLI->EmitInstrWithCustomInserter(MI, MBB, EM);
|
||||||
InsertPos = MBB->end();
|
InsertPos = MBB->end();
|
||||||
} else {
|
return;
|
||||||
MBB->insert(InsertPos, MI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MBB->insert(InsertPos, MI);
|
||||||
|
|
||||||
// Additional results must be an physical register def.
|
// Additional results must be an physical register def.
|
||||||
if (HasPhysRegOuts) {
|
if (HasPhysRegOuts) {
|
||||||
for (unsigned i = II.getNumDefs(); i < NumResults; ++i) {
|
for (unsigned i = II.getNumDefs(); i < NumResults; ++i) {
|
||||||
|
Reference in New Issue
Block a user