RFR: 8367292: VectorAPI: Optimize VectorMask.fromLong/toLong() for SVE [v3]
    Emanuel Peter 
    epeter at openjdk.org
       
    Fri Oct 24 07:34:10 UTC 2025
    
    
  
On Fri, 24 Oct 2025 07:24:28 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/aarch64_vector.ad line 395:
>> 
>>> 393:   // By default, all the mask query operations without predicate support
>>> 394:   // requires the mask to be saved in a boolean vector.
>>> 395:   bool Matcher::mask_op_uses_packed_vector(int opcode, const TypeVect* vt) {
>> 
>> I find `uses` to be ambiguous. does `mask_op` require packed vector (nothing else accepted), or just allow packed vector (and other options are also accepted)?
>> 
>> Your `Return true if` comment above suggests it is a `requires` case, right?
>> 
>> Could you please also add a `Return false if` comment?
>
> Could we have some sort of assert on `vt` here? What input types are allowed? `isa_vect`, `isa_vectmask`, and what else?
There could be additional confusion: is the `packed vector` for the mask, or for all its inputs? is the `vt` for the mask type, or the output type of the `mask_op`?
Suggestion:
`mask_op_uses_packed_vector` -> `mask_op_uses_packed_vector_mask`
`vt` -> `mask_vt`
What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27481#discussion_r2459149531
    
    
More information about the hotspot-compiler-dev
mailing list