RFR: 8367292: VectorAPI: Optimize VectorMask.fromLong/toLong() for SVE [v4]
Emanuel Peter
epeter at openjdk.org
Tue Oct 28 10:30:06 UTC 2025
On Tue, 28 Oct 2025 10:15:34 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> 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.
See answer here:
https://github.com/openjdk/jdk/pull/27481#discussion_r2468923970
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27481#discussion_r2468930663
More information about the hotspot-compiler-dev
mailing list