RFR: 8317976: Optimize SIMD sort for AMD Zen 4
Paul Sandoz
psandoz at openjdk.org
Fri Mar 14 17:41:59 UTC 2025
On Fri, 14 Mar 2025 10:48:09 GMT, Rohit Arul Raj <rraj at openjdk.org> wrote:
> This change enables optimized SIMD sort for AMD Zen 4 (AVX2) & Zen 5 (AVX512).
>
> JTREG Tests: Completed Tier1 & Tier2 tests on Zen4 & Zen5 - No Regressions.
>
> Attaching ArraySort performance data for Zen4 & Zen5.
> [Zen4-ArraySort-Data.txt](https://github.com/user-attachments/files/19245831/Zen4-ArraySort-Data.txt)
> [Zen5-ArraySort-Data.txt](https://github.com/user-attachments/files/19245833/Zen5-ArraySort-Data.txt)
src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 4331:
> 4329: snprintf(ebuf_, sizeof(ebuf_),
> 4330: ((VM_Version::is_intel() || (VM_Version::is_amd() && (VM_Version::cpu_family() > 0x19)))
> 4331: && VM_Version::supports_avx512dq()) ? "avx512_sort" : "avx2_sort");
Perhaps factor the expression to a separate method rather than repeat it three times?
Can we add some constant with a descriptive name for the CPU family rather than directly using 0x19?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24053#discussion_r1996006886
More information about the hotspot-compiler-dev
mailing list