target_clones constexpr

Victor Rodriguez vm.rod25@gmail.com
Wed Jan 17 17:52:00 GMT 2018


On Tue, Jan 16, 2018 at 2:57 PM, Schulz, Roland <roland.schulz@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Matthias Kretz [mailto:m.kretz@gsi.de]
>> Sent: Monday, January 15, 2018 7:24 AM
>> To: gcc-help@gcc.gnu.org
>> Cc: Schulz, Roland <roland.schulz@intel.com>; Victor Rodriguez
>> <vm.rod25@gmail.com>; Mason <slash.tmp@free.fr>; O Mahony, Billy
>> <billy.o.mahony@intel.com>; Evgeny Stupachenko <evstupac@gmail.com>;
>> Jakub Jelinek <jakub@redhat.com>
>> 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

Thanks for filling a feature request, if approved I'm going to ask to
assign it to me

regards



More information about the Gcc-help mailing list