<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Cool, I had not noticed that. Thanks for pointing it out. I'll have a read and reach out to James.</div><div class="gmail_default" style="font-family:verdana,sans-serif">
We should be able to use the same infrastructure for both SLP and Loop vectorization.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 17, 2014 at 1:53 PM, Arnold Schwaighofer <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Jan 17, 2014, at 1:18 PM, Raul Silvera <<a href="mailto:rsilvera@google.com">rsilvera@google.com</a>> wrote:<br>
<br>
> That's what I'm seeing. I can get this code to be exercised if I manually change the calls to intrinsics, and that's how I've been testing it.<br>
><br>
> My plan is to have two more phases for this work:<br>
> 1. Mimic the code in the Loop vectorizer so that we vectorize a small set of math function calls into vector intrinsics.<br>
><br>
> 2. Develop a configurable mechanism to allow vectorization of arbitrary functions, integrated into TargetLibraryInfo. This would be configurable so that vectorization would be sensitive to different vector libraries available in each platform.<br>

<br>
</div>Have you seen the "RFC: enable vectorization of call instructions in the loop vectorizer" thread?<br>
<a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140113/201603.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140113/201603.html</a><br>
<br>
James Molloy is implementing a TargetLibraryInfo interface for this use case - vectorized versions of functions - and teaching the loop vectorizer to use it.<br>
<br>
<br>
Thanks,<br>
Arnold<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
><br>
><br>
> On Fri, Jan 17, 2014 at 12:41 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br>
> ----- Original Message -----<br>
> > From: "Nadav Rotem" <<a href="mailto:nrotem@apple.com">nrotem@apple.com</a>><br>
> > To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
> > Cc: <a href="mailto:reviews%2BD2535%2Bpublic%2B071e8fd9238b048b@llvm-reviews.chandlerc.com">reviews+D2535+public+071e8fd9238b048b@llvm-reviews.chandlerc.com</a>, <a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>, <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>,<br>

> > <a href="mailto:rsilvera@google.com">rsilvera@google.com</a><br>
> > Sent: Friday, January 17, 2014 2:18:53 PM<br>
> > Subject: Re: [PATCH] Enable SLP-vectorization of intrinsics.<br>
> ><br>
> > I think that we are converting some functions to llvm intrinsics.<br>
> > Right?<br>
><br>
> Clang produces intrinsics for sqrt (only in fast-math mode), pow and fma. I think that's it, and until you get to CodeGen, I don't think we normally convert anything else at the LLVM level.<br>
><br>
>  -Hal<br>
><br>
> ><br>
> > On Jan 17, 2014, at 12:11 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br>
> ><br>
> > > ----- Original Message -----<br>
> > >> From: "Nadav Rotem" <<a href="mailto:nrotem@apple.com">nrotem@apple.com</a>><br>
> > >> To: <a href="mailto:nrotem@apple.com">nrotem@apple.com</a>, <a href="mailto:rsilvera@google.com">rsilvera@google.com</a><br>
> > >> Cc: <a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>, <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> > >> Sent: Friday, January 17, 2014 2:06:55 PM<br>
> > >> Subject: Re: [PATCH] Enable SLP-vectorization of intrinsics.<br>
> > >><br>
> > >><br>
> > >>  The code looks great.  I was wondering if you had a chance to run<br>
> > >>  some performance tests on it.  Does it catch anything in the LLVM<br>
> > >>  test suite?<br>
> > ><br>
> > > Why do you expect it to catch anything in the test-suite until we<br>
> > > get the function calls too (just as we do in the loop vectorizer)?<br>
> > ><br>
> > > -Hal<br>
> > ><br>
> > >><br>
> > >> <a href="http://llvm-reviews.chandlerc.com/D2535" target="_blank">http://llvm-reviews.chandlerc.com/D2535</a><br>
> > >> _______________________________________________<br>
> > >> llvm-commits mailing list<br>
> > >> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> > >> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
> > >><br>
> > ><br>
> > > --<br>
> > > Hal Finkel<br>
> > > Assistant Computational Scientist<br>
> > > Leadership Computing Facility<br>
> > > Argonne National Laboratory<br>
> ><br>
> ><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
><br>
><br>
><br>
> --<br>
>  Raúl E. Silvera<br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font size="4" face="arial black, sans-serif" style="background-color:rgb(0,0,0)" color="#b45f06"> Raúl E. Silvera </font></div>
<div><br></div></div>
</div>