RFR: JDK-8320448 Accelerate IndexOf using AVX2 [v7]
Scott Gibbons
sgibbons at openjdk.org
Tue Jan 16 23:53:53 UTC 2024
On Tue, 16 Jan 2024 22:27:52 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Scott Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits:
>>
>> - Merge branch 'openjdk:master' into indexof
>> - Merge branch 'openjdk:master' into indexof
>> - Addressing review comments.
>> - Fix for JDK-8321599
>> - Support UU IndexOf
>> - Only use optimization when EnableX86ECoreOpts is true
>> - Fix whitespace
>> - Merge branch 'openjdk:master' into indexof
>> - Comments; added exhaustive-ish test
>> - Subtracting 0x10 twice.
>> - ... and 12 more: https://git.openjdk.org/jdk/compare/8e12053e...3e58d0c2
>
> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 4111:
>
>> 4109: if ((UseAVX == 2) && EnableX86ECoreOpts && VM_Version::supports_avx2()) {
>> 4110: StubRoutines::_string_indexof = generate_string_indexof();
>> 4111: }
>
> What motivation for this extensive new code only for avx2? 30% is nice (for some cases) but it is enabled only for AVX2 and not for avx512 which all modern x86 CPUs have so the code will not be used.
>
> Or it is typo?
This is acceleration for AVX2, replacing the pcmpestri instruction which is microcoded on E-cores and causes significant performance impact. I am working on a pared-down implementation and should update this PR in a couple of days.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16753#discussion_r1454217437
More information about the hotspot-compiler-dev
mailing list