[LLVMdev] SelectionDAG scalarizes vector operations.
David A. Greene
greened at obbligato.org
Wed Feb 8 07:30:29 PST 2012
"Rotem, Nadav" <nadav.rotem at intel.com> writes:
> We generate xEXT nodes in many cases. Unlike GCC which vectorizes
> inner loops, we vectorize the implicit outermost loop of data-parallel
> workloads (also called whole function vectorization). We vectorize
> code even if the user uses xEXT instructions, uses mixed types, etc.
> We choose a vectorization factor which is likely to generate more
> legal vector types, but if the user mixes types then we are forced to
> make a decision. We rely on the LLVM code generator to produce
> quality code. To my understanding, the GCC vectorizer does not
> vectorize code if it thinks that it misses a single operation.
My experience is similar to Nadav's. The Cray vectorizer vectorizes
much more code that the gcc vectorizer. Things are much more
complicated than gcc vector code would lead one to believe.
More information about the llvm-dev