https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89929
--- Comment #30 from Chris Elrod <elrodc at gmail dot com> --- > #if defined(__clang__) > #define MULTIVERSION > \ > __attribute__((target_clones("avx512dq", "avx2", "default"))) > #else > #define MULTIVERSION > \ > __attribute__((target_clones( > \ > "arch=skylake-avx512,arch=cascadelake,arch=icelake-client,arch=" > \ > "tigerlake," > \ > "arch=icelake-server,arch=sapphirerapids,arch=cooperlake", > \ > "avx2", "default"))) > #endif For example, I can do something like this, but gcc produces a ton of unnecessary duplicates for each of the avx512dq architectures. There must be a better way.