Skip to content

Commit b369de6

Browse files
committed
Refactor 'supports_avx512_simd_sort' code to make it easily readable
1 parent 4201191 commit b369de6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/hotspot/cpu/x86/vm_version_x86.hpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,15 @@ class VM_Version : public Abstract_VM_Version {
774774
static bool cpu_supports_evex() { return (_cpu_features & CPU_AVX512F) != 0; }
775775

776776
static bool supports_avx512_simd_sort() {
777-
// Disable AVX512 version of SIMD Sort on AMD Zen4 Processors
778-
return ((is_intel() || (is_amd() && (cpu_family() > CPU_FAMILY_AMD_19H))) && supports_avx512dq()); }
777+
if (supports_avx512dq()) {
778+
// Disable AVX512 version of SIMD Sort on AMD Zen4 Processors.
779+
if (is_amd() && cpu_family() == CPU_FAMILY_AMD_19H) {
780+
return false;
781+
}
782+
return true;
783+
}
784+
return false;
785+
}
779786

780787
// Intel features
781788
static bool is_intel_family_core() { return is_intel() &&

0 commit comments

Comments
 (0)