]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Set Prefer_No_AVX512 flag for hygon platform
authorXie jiamei <xiejiamei@hygon.cn>
Tue, 11 Nov 2025 02:28:54 +0000 (10:28 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 11 Nov 2025 02:47:26 +0000 (10:47 +0800)
Benchmarks indicate evex can be more profitable on Hygon hardware
than AVX512. So add Prefer_No_AVX512 to make it run with evex.

Change-Id: Icc59492f71fde7a783a8bd315714ffd6f7ecaf29
Signed-off-by: Li jing <lijing@hygon.cn>
Signed-off-by: Xie jiamei <xiejiamei@hygon.cn>
sysdeps/x86/cpu-features.c

index 5d4437ffdfae41e958e8a9500673c95c63642ebc..ecf10ce44d481c3b648ce67b68141ceb4079d2ba 100644 (file)
@@ -1129,6 +1129,13 @@ disable_tsx:
          cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load]
            &= ~bit_arch_AVX_Fast_Unaligned_Load;
        }
+      else if (model == 0x7)
+       {
+         /* Benchmarks indicate evex can be more profitable on Hygon
+            hardware than AVX512.  */
+         cpu_features->preferred[index_arch_Prefer_No_AVX512]
+           |= bit_arch_Prefer_No_AVX512;
+       }
     }
   else
     {