RFR: 8358521: Optimize vector operations by reassociating broadcasted inputs [v2]
Jatin Bhateja
jbhateja at openjdk.org
Tue Feb 10 05:38:09 UTC 2026
On Tue, 10 Feb 2026 02:29:11 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review comments resolutions
>
> src/hotspot/share/opto/vectornode.cpp line 1317:
>
>> 1315: }
>> 1316: return nullptr;
>> 1317: }
>
> Reassociation can be a separate optimization for vector nodes to me. Do you think it's better to split it as a separate change following the broadcast optimization? We can add specific tests for it.
Reassociation are only applicable to integral vector operation, for vector API we only use fp-fast model semantics for reductions of floating point vector, I have now added tests to cover all possible transformations so that we can include both associated transforms in same patch.
> test/hotspot/jtreg/compiler/vectorapi/TestVectorBroadcastReassociations.java line 136:
>
>> 134: * ======================= */
>> 135:
>> 136: static final VectorSpecies<Long> LSP = LongVector.SPECIES_256;
>
> Why not using the `SPECIES_PREFERRED` instead like the int species? The max vector size for AArch64 NEON (asimd) is 128-bit. We have to add another condition `MaxVectorSize >= 32` for following IR tests if using `SPECIES_256`.
Done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25617#discussion_r2785891612
PR Review Comment: https://git.openjdk.org/jdk/pull/25617#discussion_r2785892467
More information about the core-libs-dev
mailing list