summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-10-26 21:20:52 +0000
committerDehao Chen <dehao@google.com>2017-10-26 21:20:52 +0000
commited2d5402cb16e77dd2cf720a09b5638f6aa4ef33 (patch)
tree3861031ef001bb68d469ef4861a22dfd3d100ddb /llvm/lib/Transforms/Vectorize
parentb8d7d4d683ada9f4d0cf40a07ab794ee9fddfafe (diff)
downloadbcm5719-llvm-ed2d5402cb16e77dd2cf720a09b5638f6aa4ef33.tar.gz
bcm5719-llvm-ed2d5402cb16e77dd2cf720a09b5638f6aa4ef33.zip
Do not add discriminator encoding for debug intrinsics.
Summary: There are certain requirements for debug location of debug intrinsics, e.g. the scope of the DILocalVariable should be the same as the scope of its debug location. As a result, we should not add discriminator encoding for debug intrinsics. Reviewers: dblaikie, aprantl Reviewed By: aprantl Subscribers: JDevlieghere, aprantl, bjope, sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D39343 llvm-svn: 316703
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 0e380322c00..9da03f307c5 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -803,7 +803,8 @@ static Instruction *getDebugLocFromInstOrOperands(Instruction *I) {
void InnerLoopVectorizer::setDebugLocFromInst(IRBuilder<> &B, const Value *Ptr) {
if (const Instruction *Inst = dyn_cast_or_null<Instruction>(Ptr)) {
const DILocation *DIL = Inst->getDebugLoc();
- if (DIL && Inst->getFunction()->isDebugInfoForProfiling())
+ if (DIL && Inst->getFunction()->isDebugInfoForProfiling() &&
+ !isa<DbgInfoIntrinsic>(Inst))
B.SetCurrentDebugLocation(DIL->cloneWithDuplicationFactor(UF * VF));
else
B.SetCurrentDebugLocation(DIL);
OpenPOWER on IntegriCloud