Set debug loc.

llvm-svn: 133636
This commit is contained in:
Devang Patel 2011-06-22 19:52:36 +00:00
parent 90e6a4e5d5
commit ea7751bc24
1 changed files with 2 additions and 0 deletions

View File

@ -1400,6 +1400,8 @@ void IndVarSimplify::RewriteIVExpressions(Loop *L, SCEVExpander &Rewriter) {
// Patch the new value into place.
if (Op->hasName())
NewVal->takeName(Op);
if (Instruction *NewValI = dyn_cast<Instruction>(NewVal))
NewValI->setDebugLoc(User->getDebugLoc());
User->replaceUsesOfWith(Op, NewVal);
UI->setOperandValToReplace(NewVal);