RFR: 8370863: VectorAPI: Optimize the VectorMaskCast chain in specific patterns [v8]

Emanuel Peter epeter at openjdk.org
Tue Jan 27 08:13:42 UTC 2026


On Tue, 27 Jan 2026 08:09:47 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Eric Fang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>> 
>>  - Update copyright year to 2026
>>  - Merge branch 'master' into JDK-8370863-mask-cast-opt
>>  - Convert the check condition for vector length into an assertion
>>    
>>    Also refined the tests.
>>  - Refine code comments
>>  - Merge branch 'master' into JDK-8370863-mask-cast-opt
>>  - Merge branch 'master' into JDK-8370863-mask-cast-opt
>>  - Add MaxVectorSize IR test condition for VectorStoreMaskIdentityTest.java
>>  - Refine the test code and comments
>>  - Merge branch 'master' into JDK-8370863-mask-cast-opt
>>  - Don't read and write the same memory in the JMH benchmarks
>>  - ... and 2 more: https://git.openjdk.org/jdk/compare/6eaabed5...9c38a6d9
>
> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java line 121:
> 
>> 119:         VectorMask<Integer> mInt128 = mFloat128.cast(IntVector.SPECIES_128);
>> 120:         return mInt128.not().trueCount();
>> 121:     }
> 
> Why can't the casts be eliminated here? Can you please add a comment to the test?

There used to be a comment, would that one still be accurate?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28313#discussion_r2730756241


More information about the hotspot-compiler-dev mailing list