RFR: 8317976: Optimize SIMD sort for AMD Zen 4 [v2]
Rohit Arul Raj
rraj at openjdk.org
Mon Mar 17 17:29:08 UTC 2025
On Mon, 17 Mar 2025 17:03:41 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
>> Rohit Arul Raj has updated the pull request incrementally with one additional commit since the last revision:
>>
>> create a separate method to check for cpu's supporting avx512 version of simd sort
>
> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 4318:
>
>> 4316: // Load x86_64_sort library on supported hardware to enable SIMD sort and partition intrinsics
>> 4317:
>> 4318: if (VM_Version::supports_avx512dq() || VM_Version::supports_avx2()) {
>
> Shouldn't you check for `VM_Version::supports_avx512_simd_sort()` here as well?
The above condition will hold for all AMD processors. Only for Zen4, even though AVX512 is supported, we want to pick AVX2 version of SIMD sort (due to the regression) which is handled by the code below:
snprintf(ebuf_, sizeof(ebuf_), **VM_Version::supports_avx512_simd_sort()** ? "avx512_sort" : "avx2_sort");
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24053#discussion_r1999288544
More information about the hotspot-compiler-dev
mailing list