Do not forget DebugLoc!

llvm-svn: 125547
This commit is contained in:
Devang Patel 2011-02-15 02:02:30 +00:00
parent 9f0ac0dd8b
commit 8d53ac81ec
1 changed files with 1 additions and 0 deletions

View 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);