This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/83875] [feature request] target_clones compatible SIMD capability/length check


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

--- Comment #2 from Roland Schulz <roland at rschulz dot eu> ---
The main problem is that it already gets resolved in the preprocessor stage.
Thus if you have:

    __attribute__((target_clones("avx","default")))
    void foo(){
#if __AVX__
    ...
#endif
    }

, it doesn't work. __AVX__ is set depending on default even for the avx clone.

Outside of target_clones it would have only a very minor advantage, that it
would work directly because it would be 1/0 rather than 1/undef, and thus
wouldn't require wrapping to be used in a constexpr context.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]