RFR: 8292898: [vectorapi] Unify vector mask cast operation [v4]

Jatin Bhateja jbhateja at openjdk.org
Tue Sep 27 03:32:20 UTC 2022


On Tue, 27 Sep 2022 01:49:26 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/hotspot/share/opto/vectorIntrinsics.cpp line 2547:
>> 
>>> 2545:       if (is_mask) {
>>> 2546:         // Make sure that cast for vector mask is implemented to particular type/size combination.
>>> 2547:         if (!arch_supports_vector(Op_VectorMaskCast, num_elem_to, elem_bt_to, VecMaskNotUsed)) {
>> 
>> Mask casting does involve loading of masks, hence we should be passing VecMaskUseLoad  instead of  VecMaskNotUsed,  I see that we are already querying target support for load/store mask nodes on Line#2439 but use of VecMaskUseAll looks stricter than needed.
>
> `VecMaskUseAll` is fine to me since the final vector box may need to store mask if it is mask casting/reinterpreting. So since it has checked the load/store mask on Line#2439, do you think it needs to double check the load mask pattern here?

Since checks related to VecMaskUseAll are decoupled from the main opcode so one check per intrinsic routine should be ok if its covering the needed trajectories. Infact we are passing VecMaskUseAll back to back to two rountines on Line #2439 and Line # 2452, WDYT ?

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

PR: https://git.openjdk.org/jdk/pull/10192


More information about the hotspot-compiler-dev mailing list