RFR: 8291600: [vectorapi] vector cast op check is not always needed for vector mask cast [v7]

Xiaohong Gong xgong at openjdk.org
Thu Sep 15 07:56:50 UTC 2022


On Thu, 15 Sep 2022 07:08:48 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Xiaohong Gong has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:
>> 
>>  - Merge branch 'jdk:master' into JDK-8291600
>>  - Address review comments
>>  - Add vector cast op check for vector mask for some cases
>>  - Revert the unify changes to vector mask cast
>>  - Merge branch 'jdk:master' into JDK-8291600
>>  - Fix x86 codegen issue
>>  - Unify VectorMaskCast for all platforms
>>  - Merge branch 'master' into JDK-8291600
>>  - 8291600: [vectorapi] vector cast op check is not always needed for vector mask cast
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 2505:
> 
>> 2503:     bool no_vec_cast_check = is_mask &&
>> 2504:                              ((src_type->isa_vectmask() && dst_type->isa_vectmask()) ||
>> 2505:                               type2aelembytes(elem_bt_from) == type2aelembytes(elem_bt_to));
> 
> Same check is existing at https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/vectorIntrinsics.cpp#L2551, can we do some factoring.

Yes, we can. But consider these codes will be optimized out in the follow-up unify patch (see https://github.com/openjdk/jdk/pull/10192), do you think it's necessary to do some simple factorization here? If it's necessary, I can change the codes. Thanks!

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

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


More information about the hotspot-compiler-dev mailing list