RFR: 8367292: VectorAPI: Optimize VectorMask.fromLong/toLong() for SVE [v2]
    Emanuel Peter 
    epeter at openjdk.org
       
    Thu Oct 23 10:53:07 UTC 2025
    
    
  
On Thu, 23 Oct 2025 10:47:15 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Yes, this means the mask is a type of `TypeVect`. This just happens on architectures that do not support the predicate feature like NEON. On these architectures, `VectorStoreMaskNode` will convert the unpacked vector to a packed one. Some vector mask operations' implementation works on the packed mask layout on these architectures.
>
> @XiaohongGong thanks for all he explanations. From what you say, it seems that `vector_mask_must_be_packed` is good.
> VectorStoreMask is a opposite operation of VectorLoadMask. We can treat it as a layout conversion for a vector mask. It is used to convert a vector mask (either a unpacked vector or a predicate) to a packed vector status (i.e. 8-bit element size). Because, in Java API, elements of a VectorMask is stored into a boolean array.
Thanks for the explanation! So it really only does the conversion, right? And no loading / storing? If that is true, we may want to rename them to `ConvPredicate2PackedVectorMaskNode`, or alike. What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27481#discussion_r2454703914
    
    
More information about the hotspot-compiler-dev
mailing list