[PATCH] D49347: [WIP][DebugInfo][InstCombine] DebugLoc in induction PHI
Anastasis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 15 06:12:40 PDT 2018
gramanas added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2572
IRBuilder<> Builder(&*Header->getFirstInsertionPt());
- Instruction *OldInst = getDebugLocFromInstOrOperands(OldInduction);
- setDebugLocFromInst(Builder, OldInst);
----------------
This is redundant as the variable DL has the exact same pointer as OldInst, that gets it from the call to `createInductionVariable`
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2572
+ DebugLoc Loc;
+ DL ? Loc = DL->getDebugLoc() : Loc = L->getStartLoc();
+
----------------
gramanas wrote:
> This is redundant as the variable DL has the exact same pointer as OldInst, that gets it from the call to `createInductionVariable`
`L->getStartLoc()` doesn't seem to be the correct debug loc for the phi and add instructions below. I've been using the same test as rL336667 for the tests and I think the correct DL to attach to these instructions is the one from `%mul16 = phi i8`.
@vsk what do you think?
Repository:
rL LLVM
https://reviews.llvm.org/D49347
More information about the llvm-commits
mailing list