> -----Original Message----- > From: Matthias Kretz [mailto:m.kretz@xxxxxx] > Sent: Monday, January 15, 2018 7:24 AM > To: gcc-help@xxxxxxxxxxx > Cc: Schulz, Roland <roland.schulz@xxxxxxxxx>; Victor Rodriguez > <vm.rod25@xxxxxxxxx>; Mason <slash.tmp@xxxxxxx>; O Mahony, Billy > <billy.o.mahony@xxxxxxxxx>; Evgeny Stupachenko <evstupac@xxxxxxxxx>; > Jakub Jelinek <jakub@xxxxxxxxxx> > Subject: Re: target_clones constexpr > > On Donnerstag, 11. Januar 2018 20:37:55 CET Schulz, Roland wrote: > > I would like to do something like: [...] > > +1 > > > I would like to use width to do manual strip-mining or instantiate > > SIMD C++ templates. The problem is that this doesn't compile because > > __builtin_cpu_supports isn't constexpr. For every clone of foo, the > > compiler knows the SIMD support at compile time. I'm looking for a > > builtin which lets me query that in a constexpr way. > > AFAIK there is nothing (I'd be happy to be proven wrong). I also can't think of > any hack that would produce the value as a constant expression. (I tried > `using v64 [[gnu::vector_size(64)]] = float; alignof(v64)`, but its alignment is > 64, independent of the register size it uses.) I filed it as feature request: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83875 Roland