[llvm-commits] [PATCH] Expand VSELECT on ARM/NEON

Peter Couperus peter.couperus at st.com
Fri Oct 12 14:42:38 PDT 2012


Hello,

No, I sure don't.  Would you please commit for me :)?
Thanks!

Pete


On 10/12/2012 02:40 PM, Jim Grosbach wrote:
> LGTM.
>
> Do you have commit access?
>
> -Jim
>
>
> On Oct 12, 2012, at 1:17 PM, Peter Couperus<peter.couperus at st.com>  wrote:
>
>> Hello Jim,
>>
>> Much thanks for the review, and the comments.  I am re-attaching the patch with the suggested modifications to the test case.
>> I dropped the calling convention, and am now following the run convention from vcgt.ll instead of having a specific triple.
>> I also make sure that we see:
>>
>> vcgt.s32 qA, qB, qC
>> vbsl qA, qB, qC
>>
>> Let me know if I this looks good, or if should make any other mods.
>> Thanks!
>>
>> Pete
>>
>>
>> On 10/12/2012 11:59 AM, Jim Grosbach wrote:
>>> Very cool. Thanks!
>>>
>>> A bit of minor cleanup for the test case:
>>>
>>> +; RUN: llc -march=arm -mattr=+neon<   %s
>>> +; Make sure that ARM backend with NEON handles vselect.
>>> +
>>> +define arm_aapcscc void  @vmax_v4i32(<4 x i32>* %m,<4 x i32>   %a,<4 x i32>   %b) {
>>> +    %cmpres = icmp sgt<4 x i32>   %a, %b
>>> +    %maxres = select<4 x i1>   %cmpres,<4 x i32>   %a,<4 x i32>   %b
>>> +    store<4 x i32>   %maxres,<4 x i32>* %m
>>> +    ret void
>>> +}
>>>
>>> No need for an explicit calling convention. Just use a full target-triple in the RUN line instead.
>>>
>>> The test should have CHECK lines that we're generating the expected code, not just that we don't crash. In particular for this case, we should be checking for the vbsl and vcgt.s32 and that their operands align properly (see some of the other test cases and the FileCheck docs for regex support to avoid dependencies on regalloc order if you're not already familiar with that).
>>>
>>> On Oct 12, 2012, at 9:17 AM, Peter Couperus<peter.couperus at st.com>   wrote:
>>>
>>>> Hello,
>>>>
>>>> Following this discussion:
>>>> http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/054345.html
>>>>
>>>> Here is a patch which marks VSELECT with appropriate vector types as Expand on ARM targets with NEON.
>>>> Previously, VSELECT was unhandled in the ARM backend.
>>>> This addresses the following PRs:
>>>>
>>>> http://llvm.org/bugs/show_bug.cgi?id=13831
>>>> http://llvm.org/bugs/show_bug.cgi?id=13961
>>>>
>>>> Thanks!
>>>>
>>>> Pete
>>>>
>>>> <arm_vselect_expand.diff>_______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> <arm_vselect_expand_redux.diff>




More information about the llvm-commits mailing list