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

Xiaohong Gong xgong at openjdk.org
Wed Oct 29 10:19:02 UTC 2025


On Tue, 28 Oct 2025 10:27:39 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Well, we went with `prefers` because you said that on `aarch64` both are implemented, see our conversation above. So we are now spinning in circles.
>> 
>> I would approach it like this:
>> Write down what it means if the method returns true, and what it means if it returns false. Make sure to use `requires`, if anything else is not permitted/implemented. Use `prefers` if both are permitted/implemented, but one is preferred.
>
> Another idea: use a return `Enum`. Then you can give things names, which can sometimes be more helpful than `true/false`.

Hi @eme64 , I updated a commit which mainly changes the comments. The function name `mask_op_prefers_predicate` remains unchanged. After giving it careful thought overnight, I believe this name is more accurate. I’m sorry if my earlier explanation caused any confusion. Would you mind checking whether it's fine to you? Thanks!

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

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


More information about the hotspot-compiler-dev mailing list