<div dir="ltr"><div><a href="https://reviews.llvm.org/D26428">https://reviews.llvm.org/D26428</a> sent to test this patch.<br></div><div><br></div><div>Dehao</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 8, 2016 at 12:39 PM, Robinson, Paul <span dir="ltr"><<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is this really NFC?  Seems like it is actually affecting the DebugLoc<br>
attached to the next instruction, if so it should have a test.<br>
--paulr<br>
<div class="HOEnZb"><div class="h5"><br>
> -----Original Message-----<br>
> From: llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org">llvm-commits-bounces@<wbr>lists.llvm.org</a>] On Behalf<br>
> Of Dehao Chen via llvm-commits<br>
> Sent: Monday, November 07, 2016 2:00 PM<br>
> To: <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> Subject: [llvm] r286159 - Reset debug loc to OldInduction in<br>
> InnerLoopVectorizer::<wbr>createInductionVariable. (NFC)<br>
><br>
> Author: dehao<br>
> Date: Mon Nov  7 15:59:40 2016<br>
> New Revision: 286159<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=286159&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=286159&view=rev</a><br>
> Log:<br>
> Reset debug loc to OldInduction in<br>
> InnerLoopVectorizer::<wbr>createInductionVariable. (NFC)<br>
><br>
> This is to prevent SetInsertionPoint from setting debug loc to Latch-<br>
> >getTerminator().<br>
><br>
> Modified:<br>
>     llvm/trunk/lib/Transforms/<wbr>Vectorize/LoopVectorize.cpp<br>
><br>
> Modified: llvm/trunk/lib/Transforms/<wbr>Vectorize/LoopVectorize.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> project/llvm/trunk/lib/<wbr>Transforms/Vectorize/<wbr>LoopVectorize.cpp?rev=286159&r<br>
> 1=286158&r2=286159&view=diff<br>
> ==============================<wbr>==============================<wbr>==============<br>
> ====<br>
> --- llvm/trunk/lib/Transforms/<wbr>Vectorize/LoopVectorize.cpp (original)<br>
> +++ llvm/trunk/lib/Transforms/<wbr>Vectorize/LoopVectorize.cpp Mon Nov  7<br>
> 15:59:40 2016<br>
> @@ -3040,10 +3040,12 @@ PHINode *InnerLoopVectorizer::<wbr>createIndu<br>
>      Latch = Header;<br>
><br>
>    IRBuilder<> Builder(&*Header-><wbr>getFirstInsertionPt());<br>
> -  setDebugLocFromInst(Builder,<br>
> getDebugLocFromInstOrOperands(<wbr>OldInduction));<br>
> +  Instruction *OldInst = getDebugLocFromInstOrOperands(<wbr>OldInduction);<br>
> +  setDebugLocFromInst(Builder, OldInst);<br>
>    auto *Induction = Builder.CreatePHI(Start-><wbr>getType(), 2, "index");<br>
><br>
>    Builder.SetInsertPoint(Latch-><wbr>getTerminator());<br>
> +  setDebugLocFromInst(Builder, OldInst);<br>
><br>
>    // Create i+1 and fill the PHINode.<br>
>    Value *Next = Builder.CreateAdd(Induction, Step, "index.next");<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>