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

Xiaohong Gong xgong at openjdk.org
Mon Oct 27 02:16:01 UTC 2025


On Fri, 24 Oct 2025 07:42:25 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>>> Hi @eme64 , I updated a commit with renaming the matcher function to mask_op_uses_packed_vector. Is this fine to you? The main concern here is that only the specified vector mask ops [(VectorMaskOpNode)](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/vectornode.hpp#L1343) need the packed vector mask. Name vector_mask_must_be_packed might extend the scope to all vector/mask operations.
>> 
>> Sounds, good. I'll have a look at the code. More precise names are always preferable. And some code comments can help refine the definition further: what are the guarantees if you return true or false?
>
> Maybe @PaulSandoz has a good idea for a better naming of `VectorLoadMask` and `VectorStoreMask`?
> 
> @XiaohongGong Is there any good place where we already document the different kinds of masks, and how they can be converted, and how they are used? If not: it would be really great if we could add that to `vectornode.hpp`. I also see that `TypeVectMask` has no class comment. We really should improve things there. It would make reviewing Vector API code so much easier.

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 file https://bugs.openjdk.org/browse/JDK-8370666. Thanks for your suggestion!

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

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


More information about the hotspot-compiler-dev mailing list