[LLVMdev] SelectionDAG scalarizes vector operations.

David A. Greene dag at cray.com
Wed Feb 8 08:10:58 PST 2012

Duncan Sands <baldrick at free.fr> writes:

> I think it is important we produce non-scalarized code for the IR produced by
> the GCC vectorizer, since we know it can be done (otherwise GCC wouldn't have
> produced it).  It is of course important to produce decent code in the most
> common cases coming from other vectorizers too.  However it seems sensible to
> me to start with the case where you know you can easily get perfect results
> (GCC vectorizer output) and then try to progressively extend the goodness to
> the more problematic cases coming from other vectorizers.

Of course.  I was simply supporting Nadav's explanation that there's a
lot of pessimization in the current lowering that doesn't even appear
for code generated by gcc.

We have a number of lowering modifications here to handle many of these
cases.  As always, I am slogging through trying to get them moved
upstream.  It's a long process, unfortunately.  But don't be surprised
to see changes that might look "unnecessary" but are very important for
various compilers.


More information about the llvm-dev mailing list