https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97688 --- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> --- AVX2 should be detected using __get_cpuid_count, because a sub-leaf needs to be specified for leaf 7.