Do not forget DebugLoc!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125547 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2011-02-15 02:02:30 +00:00
parent da1d660aa2
commit e7394ea9c6

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