Set debug loc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2011-06-22 19:52:36 +00:00
parent 6d3a0e287b
commit a098bf1239

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