RFR: 8286941: Add mask IR for partial vector operations for ARM SVE [v3]

Jatin Bhateja jbhateja at openjdk.org
Mon Jun 20 13:43:05 UTC 2022


On Mon, 20 Jun 2022 01:15:35 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/hotspot/share/opto/vectornode.cpp line 1669:
>> 
>>> 1667:   if (Matcher::vector_needs_partial_operations(this, vt)) {
>>> 1668:     return VectorNode::try_to_gen_masked_vector(phase, this, vt);
>>> 1669:   }
>> 
>> This is a parent node of TrueCount/FirstTrue/LastTrue and MaskToLong which perform mask querying operation on concrete predicate operands, a transformation here looks redundant to me.
>
> The main reason to add the transformation here is: the FirstTrue needs the reference to the real vector length for SVE, that we need to generate a predicate when the vector length is smaller than the max vector size.  Please check the changes of `partial_op_sve_needed` in aarch64_sve.ad.

Real vector length can be obtained by incoming input mask node.

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

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


More information about the hotspot-compiler-dev mailing list