[LLVMdev] SelectionDAG scalarizes vector operations.

Rotem, Nadav nadav.rotem at intel.com
Wed Feb 8 08:24:51 PST 2012

Hi David!

I'd be interested in hearing about the places that you had to fix.  It seems like there is a number of people who are starting to look at the quality of the generated vector code.  Maybe we should report our findings in bug reports, so that we could share the work and discuss possible findings.  I also plan to fill a few bug reports with suboptimal code. 


-----Original Message-----
From: David A. Greene [mailto:dag at cray.com] 
Sent: Wednesday, February 08, 2012 18:11
To: Duncan Sands
Cc: David A. Greene; Rotem, Nadav; Zaks, Ayal; llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] SelectionDAG scalarizes vector operations.

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.

Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

More information about the llvm-dev mailing list