[LLVMdev] Extend SLPVectorizer to struct operations that are isomorphic to vector operations?

Robison, Arch arch.robison at intel.com
Thu Apr 17 15:41:53 PDT 2014


While playing with SLPVectorizer, I notice that it will happily vectorize cases involving extractelement/insertelement, but won't vectorize isomorphic cases involving extractvalue/insertvalue (such as the attached example).  Is that something that could be straightforward to add to SLPVectorizer, or are there some hard issue?  In particular, the transformation would seem to require casts of structures to vectors and back.  The bitcast instruction requires a non-aggregate value.

I'm thinking such vectorization might be useful for codes that use structs for tuples, like (x,y,z) coordinates or complex numbers.

- Arch D. Robison


-------------- next part --------------
A non-text attachment was scrubbed...
Name: vec4.ll
Type: application/octet-stream
Size: 837 bytes
Desc: vec4.ll
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140417/b5da8e36/attachment.obj>


More information about the llvm-dev mailing list