diff --git a/src/hotspot/cpu/x86/vm_version_x86.cpp b/src/hotspot/cpu/x86/vm_version_x86.cpp index a77105efbbf..fc4cfbc5a8b 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.cpp +++ b/src/hotspot/cpu/x86/vm_version_x86.cpp @@ -1647,7 +1647,7 @@ void VM_Version::get_processor_features() { } #endif // COMPILER2 - if ((supports_sse4_2() && supports_ht()) || supports_avx()) { // Newest Intel cpus + if (is_intel_modern_cpu()) { // Newest Intel cpus if (FLAG_IS_DEFAULT(UseUnalignedLoadStores)) { UseUnalignedLoadStores = true; // use movdqu on newest Intel cpus } @@ -1883,7 +1883,7 @@ void VM_Version::get_processor_features() { if (is_intel() && is_intel_server_family() && supports_sse3()) { if (FLAG_IS_DEFAULT(AllocatePrefetchLines) && - supports_sse4_2() && supports_ht()) { // Nehalem based cpus + is_intel_modern_cpu()) { // Nehalem based cpus FLAG_SET_DEFAULT(AllocatePrefetchLines, 4); } #ifdef COMPILER2 @@ -3316,7 +3316,7 @@ int VM_Version::allocate_prefetch_distance(bool use_watermark_prefetch) { } } else { // Intel if (supports_sse3() && is_intel_server_family()) { - if (supports_sse4_2() && supports_ht()) { // Nehalem based cpus + if (is_intel_modern_cpu()) { // Nehalem based cpus return 192; } else if (use_watermark_prefetch) { // watermark prefetching on Core return 384; diff --git a/src/hotspot/cpu/x86/vm_version_x86.hpp b/src/hotspot/cpu/x86/vm_version_x86.hpp index a42558a8023..4f3580d216c 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.hpp +++ b/src/hotspot/cpu/x86/vm_version_x86.hpp @@ -958,6 +958,12 @@ public: static bool is_intel_darkmont(); + static bool is_intel_modern_cpu() { + precond(is_intel()); // should be called only for intel CPU + // Efficient cores in hybrid CPU may not support hyper-threads. + return (supports_avx() || (supports_sse4_2() && (supports_ht() || supports_hybrid()))); + } + static bool is_intel_tsc_synched_at_init(); static void insert_features_names(VM_Version::VM_Features features, stringStream& ss);