https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Yale Zhang from comment #2)
> But does level 13 really exist? I don't see any documentation for it.
Yes, apparently. It was added to driver-i386.c by Intel people, where:
if (max_level >= 13)
{
__cpuid_count (13, 1, eax, ebx, ecx, edx);
has_xsaveopt = eax & bit_XSAVEOPT;
has_xsavec = eax & bit_XSAVEC;
has_xsaves = eax & bit_XSAVES;
}
> Also, any idea why the AVX2 auto detection used for function multiversioning
> was working earlier, which used __get_cpuid()? Was it just by chance?
This is handled via a different code path in libgcc/config/i386/cpunfo.c,
get_available_features, where __cpuid_count is used to get advanced features at
level 7.