[vectorIntrinsics] RFR: 8263930: Add "VectorTest" implementation for Arm SVE

Xiaohong Gong xgong at openjdk.java.net
Wed Mar 24 07:14:49 UTC 2021


On Wed, 24 Mar 2021 06:25:52 GMT, Ningsheng Jian <njian at openjdk.org> wrote:

>> Currently the backend implementation for "VectorTestNode" is not added for Arm SVE. This node is used to test whether the mask vector is "allTrue/anyTrue". This patch adds the basic SVE implementation for it. Note that it is not totally based on the SVE predicate feature. And this will be improved once the basic SVE predicate feature is supported for Vector API.
>> 
>> For `"allTrue"`, a predicate will be firstly generated by comparing the mask vector with immediate "0". Then the result can be set based on whether no active elements are true. The codes look like:
>>   cmpeq   p0.s, p7/z, z17.s, #0   ; "z17.s" is the mask vector
>>   cset    w12, eq  // eq = none
>> 
>> For `"anyTrue"`, a predicate will be firstly generated by comparing the mask vector with immediate "-1". And the result can be set based on whether any active element is true. The codes look like:
>>   cmpeq   p0.s, p7/z, z17.s, #-1   ; "z17.s" is the mask vector
>>   cset    w12, ne  // ne = any
>
> LGTM

Thanks for the review @nsjian !

-------------

PR: https://git.openjdk.java.net/panama-vector/pull/52


More information about the panama-dev mailing list