RFR: 8370666: VectorAPI: Add clear comments for vector mask relative code in c2

Xiaohong Gong xgong at openjdk.org
Mon Jan 12 05:40:34 UTC 2026


On Fri, 9 Jan 2026 11:00:42 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> The VectorMask implementation in Vector API involves complex interactions between types, nodes, and platform-specific
>> features, making the related code in HotSpot difficult to understand and review.
>> 
>> This patch adds comprehensive comments for vector mask related types, nodes, and methods in C2 to improve code clarity and
>> maintainability.
>> 
>> Note: This patch only adds comments; no functional changes are made.
>
> src/hotspot/share/opto/vectornode.hpp line 81:
> 
>> 79: // the masked nodes.
>> 80: //
>> 81: // For example, "AddVBNode" might have two versions:
> 
> Might?
> Suggestion:
> 
> // For example:

Yes, it has two versions on architectures with predicate feature such as SVE, while the masked-version does not exist on others like NEON.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29130#discussion_r2680925193


More information about the hotspot-compiler-dev mailing list