summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-06-22 20:56:56 +0000
committerDevang Patel <dpatel@apple.com>2011-06-22 20:56:56 +0000
commitdf3ad6697bb849e514c0881ca8700ea36678cbda (patch)
treea8e02ef40eb0617a49082353008775f6a8192b02 /lib
parent46d061c0fb8965b9cf722d628d2b02bec38ce9df (diff)
downloadllvm-df3ad6697bb849e514c0881ca8700ea36678cbda.tar.gz
llvm-df3ad6697bb849e514c0881ca8700ea36678cbda.tar.bz2
llvm-df3ad6697bb849e514c0881ca8700ea36678cbda.tar.xz
New binops need debug loc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp
index 8e5a40008d..0549935328 100644
--- a/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -159,7 +159,8 @@ Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode,
}
// If we haven't found this binop, insert it.
- Value *BO = Builder.CreateBinOp(Opcode, LHS, RHS, "tmp");
+ Instruction *BO = cast<Instruction>(Builder.CreateBinOp(Opcode, LHS, RHS, "tmp"));
+ BO->setDebugLoc(SaveInsertPt->getDebugLoc());
rememberInstruction(BO);
// Restore the original insert point.
@@ -1155,6 +1156,7 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
Instruction *Add = BinaryOperator::CreateAdd(CanonicalIV, One,
"indvar.next",
HP->getTerminator());
+ Add->setDebugLoc(HP->getTerminator()->getDebugLoc());
rememberInstruction(Add);
CanonicalIV->addIncoming(Add, HP);
} else {