Do not forget DebugLoc!
[oota-llvm.git] / lib / Transforms / InstCombine / InstructionCombining.cpp
index 7208ad0c7cc4729ea824aa3391833d330c5e09de..37123d0621ebc306139a1954b152d66a6dd331ec 100644 (file)
@@ -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);