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

Quan Anh Mai duke at openjdk.org
Fri Sep 23 10:18:16 UTC 2022


On Thu, 15 Sep 2022 12:36:27 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Xiaohong Gong has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add assertion to the elem num for mast cast
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 2559:
> 
>> 2557:           op = gvn().transform(new VectorMaskCastNode(op, dst_type));
>> 2558:         } else {
>> 2559:           op = VectorMaskCastNode::makeCastNode(&gvn(), op, dst_type);
> 
> Masks are either predicated registers or vectors, in former case cast is a no-op and in later case mask casting is similar to vector casting where each vector lane is holding either a 0 or -1 value and we leverage backend implementation for existing VectorCastX2Y IR nodes.  Unification here in a way duplicating some backed implementation at least for X86.

I believe the intention is to simplify the mid-end as well as to achieve better code gen on x86

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

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


More information about the hotspot-compiler-dev mailing list