From 8d53ac81ecd85b43b7e2a29c48a8efe25869115e Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 15 Feb 2011 02:02:30 +0000 Subject: Do not forget DebugLoc! llvm-svn: 125547 --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 7208ad0c7cc..37123d0621e 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1588,6 +1588,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) { DEBUG(errs() << "IC: Old = " << *I << '\n' << " New = " << *Result << '\n'); + Result->setDebugLoc(I->getDebugLoc()); // Everything uses the new instruction now. I->replaceAllUsesWith(Result); -- cgit v1.2.3