Index: llvm/lib/CodeGen/MachineSink.cpp =================================================================== --- llvm/lib/CodeGen/MachineSink.cpp +++ llvm/lib/CodeGen/MachineSink.cpp @@ -1090,15 +1090,6 @@ static void performSink(MachineInstr &MI, MachineBasicBlock &SuccToSinkTo, MachineBasicBlock::iterator InsertPos, ArrayRef DbgValuesToSink) { - // If we cannot find a location to use (merge with), then we erase the debug - // location to prevent debug-info driven tools from potentially reporting - // wrong location information. - if (!SuccToSinkTo.empty() && InsertPos != SuccToSinkTo.end()) - MI.setDebugLoc(DILocation::getMergedLocation(MI.getDebugLoc(), - InsertPos->getDebugLoc())); - else - MI.setDebugLoc(DebugLoc()); - // Move the instruction. MachineBasicBlock *ParentBlock = MI.getParent(); SuccToSinkTo.splice(InsertPos, ParentBlock, MI,