RFR: 8342095: Add autovectorizer support for subword vector casts [v14]
Jasmine Karthikeyan
jkarthikeyan at openjdk.org
Fri Jan 23 06:32:41 UTC 2026
On Wed, 27 Aug 2025 10:20:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Jasmine Karthikeyan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>>
>> - Update tests, cleanup logic
>> - Merge branch 'master' into vectorize-subword
>> - Check for AVX2 for byte/long conversions
>> - Whitespace and benchmark tweak
>> - Address more comments, make test and benchmark more exhaustive
>> - Merge from master
>> - Fix copyright after merge
>> - Fix copyright
>> - Merge
>> - Implement patch with VectorCastNode::implemented
>> - ... and 6 more: https://git.openjdk.org/jdk/compare/8fcbb110...aabaafba
>
> test/hotspot/jtreg/compiler/loopopts/superword/TestCompatibleUseDefTypeSize.java line 513:
>
>> 511: @Test
>> 512: @IR(applyIfCPUFeature = { "avx", "true" },
>> 513: applyIfOr = {"AlignVector", "false", "UseCompactObjectHeaders", "false"},
>
> Do you think these would be supported with `asimd` as well?
> If you just cannot test with it feel free to file an RFE and then I can find someone to take care of it (e.g. as a starter bug).
I did a bit of testing on aarch64 hardware and have updated the tests to include `asimd` where supported.
> test/hotspot/jtreg/compiler/vectorization/TestSubwordTruncation.java line 76:
>
>> 74:
>> 75: @Test
>> 76: @IR(applyIfCPUFeature = { "avx2", "true" }, counts = { IRNode.VECTOR_CAST_I2S, IRNode.VECTOR_SIZE_ANY, ">0" })
>
> Do you think we can make the vector size more precise here?
This is a good idea, I've replaced the `any` sizes with `min(int, <subword>)` which should continue to be portable across architectures.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23413#discussion_r2719788905
PR Review Comment: https://git.openjdk.org/jdk/pull/23413#discussion_r2719788217
More information about the hotspot-compiler-dev
mailing list