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

kretz at kde dot org gcc-bugzilla@gcc.gnu.org
Sat Jan 20 14:15:00 GMT 2018


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

--- Comment #9 from Matthias Kretz <kretz at kde dot org> ---
> inside multi-versioned (target_clones/target) function it depends on the active target

Yes., this part is easy.

> inside a constexpr context (function/variable, your examples) or always_inline function it depends on the caller

Except that a constexpr variable isn't "called". Maybe for variables a
target_clones attribute could be used. But it feels like going a bit too far.

A constexpr function without arguments would implicitly have to take a "target"
argument. I can't judge how much of a problem that would be.


More information about the Gcc-bugs mailing list