RFR: 8367292: VectorAPI: Optimize VectorMask.fromLong/toLong() for SVE [v2]
Emanuel Peter
epeter at openjdk.org
Thu Oct 23 06:06:06 UTC 2025
On Thu, 23 Oct 2025 05:56:05 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Xiaohong Gong has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Move function comments to matcher.hpp
>> - Merge 'jdk:master' into JDK-8367292
>> - 8367292: VectorAPI: Optimize VectorMask.fromLong/toLong() for SVE
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 627:
>
>> 625: if (!Matcher::vector_mask_requires_predicate(mopc, mask_vec->bottom_type()->is_vect())) {
>> 626: mask_vec = gvn().transform(VectorStoreMaskNode::make(gvn(), mask_vec, elem_bt, num_elem));
>> 627: }
>
> What does `VectorStoreMaskNode` do exactly?
> Could you maybe add some short comment above the class definition of `VectorStoreMaskNode`?
>
> I'm guessing it turns a predicate into a packed vector, right?
> If that is correct, then it would make more sense to check something like
> Suggestion:
>
> if (Matcher::vector_mask_must_be_packed_vector(mopc, mask_vec->bottom_type()->is_vect())) {
> mask_vec = gvn().transform(VectorStoreMaskNode::make(gvn(), mask_vec, elem_bt, num_elem));
> }
I'm wondering if the name `VectorStoreMaskNode` is even very good. Is it about storing a mask, or a mask for storing? But is it really limited to storing things, or could it also be for loads? Or is it rather a conversion?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27481#discussion_r2454008884
More information about the hotspot-compiler-dev
mailing list