[PATCH] x86: Handle unknown family CPUs with default tuning
H.J. Lu
hjl.tools@gmail.com
Fri Apr 11 02:10:47 GMT 2025
On Thu, Apr 10, 2025 at 6:48 PM Sunil K Pandey <sunil.k.pandey@intel.com> wrote:
>
> If AVX is available, enable default tuning
> - Rep string instruction
> - Unaligned load
> - Unaligned copy
> - Pminub for stringop
>
> Tested on x86, no regression.
> ---
> sysdeps/x86/cpu-features.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
> index f1d2a179e4..d338e88397 100644
> --- a/sysdeps/x86/cpu-features.c
> +++ b/sysdeps/x86/cpu-features.c
> @@ -932,6 +932,18 @@ https://www.intel.com/content/www/us/en/support/articles/000059422/processors.ht
> break;
> }
> }
> + else
> + {
> + /* Unknown family processor. Enable default tuning. */
> + if (CPU_FEATURES_CPU_P (cpu_features, AVX))
> + /* Rep string instructions, unaligned load, unaligned copy,
> + and pminub are fast on Intel Core i3, i5 and i7. */
> + cpu_features->preferred[index_arch_Fast_Rep_String]
> + |= (bit_arch_Fast_Rep_String
> + | bit_arch_Fast_Unaligned_Load
> + | bit_arch_Fast_Unaligned_Copy
> + | bit_arch_Prefer_PMINUB_for_stringop);
> + }
Please do
unsigned int microarch = INTEL_UNKNOWN;
if (family == 0x06)
{
model += extended_model;
microarch = intel_get_fam6_microarch (model, stepping);
}
switch (microarch)
{
}
>
> /* Since AVX512ER is unique to Xeon Phi, set Prefer_No_VZEROUPPER
> --
> 2.49.0
>
--
H.J.
More information about the Libc-alpha
mailing list