[llvm-commits] [llvm] r99538 - /llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Chris Lattner
sabre at nondot.org
Thu Mar 25 11:49:10 PDT 2010
Author: lattner
Date: Thu Mar 25 13:49:10 2010
New Revision: 99538
URL: http://llvm.org/viewvc/llvm-project?rev=99538&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp?rev=99538&r1=99537&r2=99538&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Thu Mar 25 13:49:10 2010
@@ -617,9 +617,10 @@
// 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) {
More information about the llvm-commits
mailing list