https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121606
--- Comment #14 from Marko Mäkelä <marko.makela at mariadb dot com> --- I realized that I can simply revert the changes that I had made to the compiler detection in https://github.com/dr-m/crc32_simd/ (a C++11 port of the CRC-32 assembler routines in https://github.com/intel/intel-ipsec-mb/) and just do the following: #if __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 9) /* clang 8 does not support _xgetbv(), which we also need */ # define TARGET "pclmul,avx512f,avx512dq,avx512bw,avx512vl,vpclmulqdq" # define USE_VPCLMULQDQ __attribute__((target(TARGET))) #else # define USE_VPCLMULQDQ /* nothing */ #endif I had tried to "future-proof" the code by adding the evex512 attribute, when I learned about a possible AVX10.1-256 future. That attribute had been introduced in GCC 14 and clang 18. Later on, before any AVX10.1-256 products were announced, the future of AVX512 was adjusted to be an always-512-bit AVX10.1 and AVX10.2. The evex512 target attribute was removed from GCC trunk (the upcoming GCC 16). As far as I can tell, it still has not been removed from clang trunk; the following test program compiles just fine on https://godbolt.org: #include <immintrin.h> __attribute__((target("evex512,avx512vl"))) __m512i xor3_512(__m512i a, __m512i b, __m512i c) { return _mm512_ternarylogic_epi64(a, b, c, 0x96); } I think that this bug report can be closed. There should be no reason to ever use the evex512 attribute, because as far as I understand, it is implied by the use of any of the avx512 attributes.
