summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-07-10 13:29:50 +0000
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-07-10 13:29:50 +0000
commit612bf7cac568b7670b06e0d2c1e784e39bbf23aa (patch)
tree29856ec6ea8a8d2cca1daf963bb45d449a7c1e64 /llvm/lib/Transforms
parent9cc6d3b30564e873a1076e6f0a0c9533be86440b (diff)
downloadbcm5719-llvm-612bf7cac568b7670b06e0d2c1e784e39bbf23aa.tar.gz
bcm5719-llvm-612bf7cac568b7670b06e0d2c1e784e39bbf23aa.zip
[DebugInfo][LoopVectorize] Preserve DL in induction PHI and Add
Differential Revision: https://reviews.llvm.org/D48968 llvm-svn: 336667
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 2a150e6c321..802f38e13da 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1821,6 +1821,7 @@ void InnerLoopVectorizer::createVectorIntOrFpInductionPHI(
// factor. The last of those goes into the PHI.
PHINode *VecInd = PHINode::Create(SteppedStart->getType(), 2, "vec.ind",
&*LoopVectorBody->getFirstInsertionPt());
+ VecInd->setDebugLoc(EntryVal->getDebugLoc());
Instruction *LastInduction = VecInd;
for (unsigned Part = 0; Part < UF; ++Part) {
VectorLoopValueMap.setVectorValue(EntryVal, Part, LastInduction);
@@ -1831,6 +1832,7 @@ void InnerLoopVectorizer::createVectorIntOrFpInductionPHI(
LastInduction = cast<Instruction>(addFastMathFlag(
Builder.CreateBinOp(AddOp, LastInduction, SplatVF, "step.add")));
+ LastInduction->setDebugLoc(EntryVal->getDebugLoc());
}
// Move the last step to the end of the latch block. This ensures consistent
OpenPOWER on IntegriCloud