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

--- Comment #16 from Nikolay Bogoychev <nheart at gmail dot com> ---
Created attachment 46187
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46187&action=edit
target("arch=foo") doesn't work

(In reply to Martin Liška from comment #15)
> @Nikolay:
> 
> As discussed in https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00416.html
> email thread, we reached the following consensus with H.J:
> 
> - As any AVX512 extensions (apart from AVX512F) can be enabled individually,
> it's difficult to come up with priorities in dispatcher.
> - We don't have a syntax for target_clone attribute where one would say e.g.
> avx512f+avx512cd+avx512er.
> - So that we would reject these (AVX512* except AVX512F) in target_clone
> attribute and we recommend to use rather.
> target_clones(arch=skylake,arch=skylake-avx512,arch=cannonlake,arch=icelake-
> client,arch=icelake-server, ..)
> - Using that one can cover used AVX512 ISA combinations for existing CPUs
> 
> Does it work for you Nikolay?

@Martin:

Thank you for the detailed answer. This could work for now. I have a few
questions about it:

Wouldn't that create issues in the future if AMD decide to release avx512 for
their CPUs?

In case we are using C style target annotation (and not function
multi-versioning), should we also use target(arch=skylake-avx512) instead of
target(avx512bw)? 

Also it seems that target("arch=foo") fails for my simple example with target
specific option mismatch error (but works in clang).

 If I change target to avx2 it compiles again.

Cheers,

Nick

Reply via email to