[vectorIntrinsics+mask] RFR: 8264563: Add masked vector intrinsics for binary/store operations [v2]

Xiaohong Gong xgong at openjdk.java.net
Tue Apr 20 02:06:10 UTC 2021


On Tue, 6 Apr 2021 22:52:04 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Hi, the scope of this PR is shortened to the Vector API java implementation and hotspot vector intrinsic changes. It adds two new hotspot vector intrinsic methods specially for the the masked binary/store, and the hotspot implementations for them.
>> 
>> The new added binary mask intrinsic is used both by masked and non-masked binary operations. And the mask argument is set to be `"null"` for non-masked version. The hotspot will generate different codes due to different mask values:
>> 
>>  1) If the mask is null, the normal no mask controlled codes are generated.
>>  2) If mask is non-null, the optimized predicated codes are generated for platforms that support mask feature (i.g. SVE/AVX-512).
>>     Otherwise, the vector blend codes are generated like before.
>> 
>> And the new added store masked intrinsic is used by masked vector store. The hotspot will generate the predicated vector store codes for platforms like SVE/AVX-512, or return to the default java implementation for other platforms.
>> 
>> Note that since no backend codes are added and the hotspot checking for the supported masked operations is set to false for all platforms currently, this patch will always generate the blend pattern as before.
>> 
>> All the backend implementations and other compiler changes will be in a separate patch.
>> 
>> Thanks,
>> Xiaohong Gong
>
> Thanks a lot @XiaohongGong for this smaller patch to get us started.
> @PaulSandoz Do the Java code changes here look good to you, please advice?
> @iwanowww Does the C2 and VectorSupport.java related code changes look good to you, please advice?

Thanks for your review @sviswa7 @PaulSandoz @jatin-bhateja! Any comments from this PR @iwanowww ?

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

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


More information about the panama-dev mailing list