<div dir="ltr">No, we do. There is no bug here, just dead code left over (harmlessly) from when i was half way through implementing this.<div><br></div><div>I'm tidying it up.</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Tue, Mar 18, 2014 at 2:54 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">----- Original Message -----<br>
> From: "Chandler Carruth" <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>><br>
> To: "Jim Grosbach" <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>><br>
> Cc: "LLVM Developers Mailing List" <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>
> Sent: Tuesday, March 18, 2014 4:49:14 PM<br>
> Subject: Re: [LLVMdev] E = L->begin() in LoopVectorize<br>
><br>
><br>
><br>
> Looking at it now, curious why no tests failed.<br>
<br>
</div>Likely we have no tests with nested loops where the loop to vectorize is not the first child of the parent loop.<br>
<br>
-Hal<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
><br>
> On Tue, Mar 18, 2014 at 2:48 PM, Jim Grosbach < <a href="mailto:grosbach@apple.com">grosbach@apple.com</a> ><br>
> wrote:<br>
><br>
><br>
> Almost certainly, yes. Nice catch!<br>
><br>
><br>
><br>
><br>
> On Mar 18, 2014, at 2:38 PM, Liang Wang < <a href="mailto:netcasper@gmail.com">netcasper@gmail.com</a> ><br>
> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > I'm studying loop vectorizer. I don't understand the code yet. But<br>
> > it looks not right to assign L->begin() to E. Is it a typo?<br>
> ><br>
> > Thanks,<br>
> > Liang<br>
> ><br>
> > diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp<br>
> > b/lib/Transforms/Vectorize/LoopVectorize.cpp<br>
> > index 435c005..87b5d79 100644<br>
> > --- a/lib/Transforms/Vectorize/LoopVectorize.cpp<br>
> > +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp<br>
> > @@ -1067,7 +1067,7 @@ struct LoopVectorize : public FunctionPass {<br>
> > // We only handle inner loops, so if there are children just<br>
> > recurse.<br>
> > if (!L->empty()) {<br>
> > bool Changed = false;<br>
> > - for (Loop::iterator I = L->begin(), E = L->begin(); I != E; ++I)<br>
> > + for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I)<br>
> > Changed |= processLoop(*I);<br>
> > return Changed;<br>
> > }<br>
> > _______________________________________________<br>
> > LLVM Developers mailing list<br>
> > <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</font></span></blockquote></div><br></div>