https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89929

Hongtao.liu <crazylht at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazylht at gmail dot com

--- Comment #31 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Chris Elrod from comment #30)
> > #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.

Maybe you can use __attribute__((target_clones("arch=x86-64-v4","avx2",
"default"))), oh it works only for GCC12.1 and trunk, not for GCC11.2

Reply via email to