RFR: 8367292: VectorAPI: Optimize VectorMask.fromLong/toLong() for SVE [v2]

Emanuel Peter epeter at openjdk.org
Tue Oct 28 09:57:19 UTC 2025


On Mon, 27 Oct 2025 16:52:25 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Hi @eme64 , I'm afraid that there is not a place that we document these things now. And I agree that clearly comments might be necessary. I'v created a separate JBS to record https://bugs.openjdk.org/browse/JDK-8370666. Thanks for your suggestion!
>
>> Maybe @PaulSandoz has a good idea for a better naming of `VectorLoadMask` and `VectorStoreMask`?
>> 
> 
> IIUC these nodes represent conversions or casts:
> - `VectorLoadMask` - converts a vector register of 8-bit lanes representing a mask to a platform-specific mask register
> - `VectorStoreMask` - converts a platform-specific mask register to a vector register of 8-bit lanes representing the mask
> 
> In theory we could model such conversations using `VectorOperators` as we do other conversions, which might hold some clues as to their names. There is already `VectorMaskCastNode`, but i believe that operates on the platform-specific mask register, casting between different vector species of the same length.
> 
> So perhaps we could rename to the following:
> 
> - `VectorLoadMask` -> `VectorCastB2MaskNode`
> - `VectorStoreMask` -> `VectorCastMask2BNode`
> 
> Having a naming convention for the various mask representations might further help and influence those names:
> - `BVectMask`, vector register of 8-bit lanes representing the mask
> - `NVectMask`, vector register of N-bit lanes representing the mask; and
> - `PVectMask`, representing the platform-specific predicate/mask register, which might be the same as `NVectMask` on certain hardware.
> 
> Does that help?

@PaulSandoz That sounds like a great idea!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27481#discussion_r2468786919


More information about the hotspot-compiler-dev mailing list