[llvm-commits] [llvm] r133642 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Devang Patel
dpatel at apple.com
Wed Jun 22 13:56:56 PDT 2011
Author: dpatel
Date: Wed Jun 22 15:56:56 2011
New Revision: 133642
URL: http://llvm.org/viewvc/llvm-project?rev=133642&view=rev
Log:
New binops need debug loc.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=133642&r1=133641&r2=133642&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Wed Jun 22 15:56:56 2011
@@ -159,7 +159,8 @@
}
// 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 @@
Instruction *Add = BinaryOperator::CreateAdd(CanonicalIV, One,
"indvar.next",
HP->getTerminator());
+ Add->setDebugLoc(HP->getTerminator()->getDebugLoc());
rememberInstruction(Add);
CanonicalIV->addIncoming(Add, HP);
} else {
More information about the llvm-commits
mailing list