diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/lib/CodeGen/MachineLICM.cpp @@ -638,6 +638,7 @@ // Since we are moving the instruction out of its basic block, we do not // retain its debug location. Doing so would degrade the debugging // experience and adversely affect the accuracy of profiling information. + assert(!MI->isDebugInstr() && "Should not hoist debug inst"); MI->setDebugLoc(DebugLoc()); // Add register to livein list to all the BBs in the current loop since a @@ -841,6 +842,7 @@ // The instruction is is moved from its basic block, so do not retain the // debug information. + assert(!I->isDebugInstr() && "Should not sink debug inst"); I->setDebugLoc(DebugLoc()); } } @@ -1536,6 +1538,7 @@ // Since we are moving the instruction out of its basic block, we do not // retain its debug location. Doing so would degrade the debugging // experience and adversely affect the accuracy of profiling information. + assert(!MI->isDebugInstr() && "Should not hoist debug inst"); MI->setDebugLoc(DebugLoc()); // Update register pressure for BBs from header to this block.