[llvm-commits] [PATCH] Allow targets to prefer vector splitting over integer promotion

Justin Holewinski justin.holewinski at gmail.com
Thu Nov 29 05:51:51 PST 2012


I'm not sure how to test this in the general case, so I've merged this with
the hook implementation in NVPTX and its associated test case.  Is this
sufficient?


On Thu, Nov 29, 2012 at 8:08 AM, Duncan Sands <baldrick at free.fr> wrote:

> On 29/11/12 14:01, Justin Holewinski wrote:
>
>> The attached patch adds a new back-end hook that allows targets to prefer
>> vector
>> splitting over integer promotion for type legalization.  Right now,
>> TargetLowering::**computeRegisterProperties() will first try to promote
>> <N x iM>
>> to <N x iP> where P > M if <N x iM> is illegal.  However, for some
>> targets, it
>> is desirable to instead prefer splitting the vector.
>>
>> The in-tree use case is the NVPTX back-end.  <N x i1> is not a legal
>> type, but
>> promotion to <N x i8> or <N x i32> is not desirable.  Instead, we want to
>> force
>> scalarization of vector code using these types (e.g. vselect).
>>
>
> This looks pretty reasonable to me.  However it needs a testcase.
>
> Ciao, Duncan.
>
>
>
>> --
>>
>> Thanks,
>>
>> Justin Holewinski
>>
>>
>>
>> ______________________________**_________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>
>>
> ______________________________**_________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>



-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121129/5da3a4bc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-targets-to-prefer-TypeSplitVector-over-TypePro.patch
Type: application/octet-stream
Size: 4479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121129/5da3a4bc/attachment.obj>


More information about the llvm-commits mailing list