[LLVMdev] Extending vector operations

Chris Lattner clattner at apple.com
Mon Jul 21 23:17:51 PDT 2008


On Jul 21, 2008, at 4:33 PM, Eli Friedman wrote:

>>
>> 2) Vector strunc, sext, zext, fptrunc and fpext
>>
>> Again, I think these are hopefully straightforward. Please let me  
>> know
>> if you expect any issues with vector operations that change element
>> sizes from the RHS to the LHS, e.g. around legalization.
>
> These are tricky to generate efficient code for because they change
> the size of the vector and most likely introduce illegal vectors.
> It'll be a lot of work to get these working well for non-trivial
> cases.

Consider something like <4 x int> -> <4 x double>.  On a target with  
128-bit vectors, this could be custom expanded/split into a convert hi  
and convert low operation.  This is real work to support, but I don't  
think this is too crazy.

-Chris



More information about the llvm-dev mailing list