[PATCH] D48968: [DebugInfo][LoopVectorize] Preserve DL in induction PHI and Add
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 11:28:13 PDT 2018
vsk added reviewers: fhahn, hsaito.
vsk added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1824
&*LoopVectorBody->getFirstInsertionPt());
+ VecInd->setDebugLoc(EntryVal->getDebugLoc());
Instruction *LastInduction = VecInd;
----------------
Why is the debug location of the entry value the correct location to use for an induction variable phi? I'd expect a merged location to be applied to the phi, based on its incoming values.
================
Comment at: test/Transforms/LoopVectorize/i8-induction.ll:15
+;
+; DEBUGLOC: ![[DbgLoc]] = !DILocation(line: 5
scalar.ph:
----------------
A reader might not expect to see a DILocation here. Please move this to the end of the file. That's where the metadata would appear in an IR dump.
================
Comment at: test/Transforms/LoopVectorize/i8-induction.ll:15
+;
+; DEBUGLOC: ![[DbgLoc]] = !DILocation(line: 5
scalar.ph:
----------------
vsk wrote:
> A reader might not expect to see a DILocation here. Please move this to the end of the file. That's where the metadata would appear in an IR dump.
Please add a comment explaining why the number '5' is here.
Repository:
rL LLVM
https://reviews.llvm.org/D48968
More information about the llvm-commits
mailing list