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

Xiaohong Gong xgong at openjdk.org
Tue Oct 28 10:18:08 UTC 2025


On Tue, 28 Oct 2025 09:53:15 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Xiaohong Gong has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename matcher helper function to "mask_op_prefers_predicate" and add
>>   more comments
>
> src/hotspot/share/opto/matcher.hpp line 339:
> 
>> 337:   // saved with a predicate type (i.e. TypeVectMask) or not. Return true if it
>> 338:   // requires a predicate type. And return false if it requires a vector type.
>> 339:   static bool mask_op_prefers_predicate(int opcode, const TypeVect* vt);
> 
> You need to decide if it is a `prefers` or a `requires` concept.
> You had some really good explanations here, and I think it would be great if you used some of that here.
> https://github.com/openjdk/jdk/pull/27481#discussion_r2464360599

To me, `requires` is more accurate. That means the backend implementation requires the mask to be saved in  a predicate register, while a vector input is not accepted.

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

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


More information about the hotspot-compiler-dev mailing list