https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78451
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyukhin at gcc dot gnu.org, | |uros at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Ah, that testcase fails even with gcc 6. Apparently even sse-22a.c fails with GCC 6, when compiled with -save-temps. I see multiple issues here. One is that while global_options-wise #pragma GCC target ("avx512bw") #pragma GCC target ("avx512vl") works as #pragma GCC target ("avx512bw,avx512vl") when considering current_target_pragma it works as #pragma GCC target ("avx512vl") only. I'll attach a fix for this soon. Another thing is that /* Doesn't require avx512vl target and is used in avx512dqintrin.h. */ extern __inline __m128i __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _mm_setzero_di (void) { return __extension__ (__m128i)(__v2di){ 0LL, 0LL}; } looks just wrong to me in avx512vlintrin.h. While it indeed doesn't need AVX512VL, I think that intrinsic needs SSE2 at least, because otherwise __v2di and __m128i don't really work. Why do we have that intrinsic at all and use it? Can't find it in AVX512 manuals, and don't see it in ICC headers either? Can't we just use _mm_setzero_si128 instead? I mean, even _mm_setzero_si128 is used in other spots even when cast to e.g. __v8hi, or __v16qi, or _mm256_setzero_si256 is used when cast to __v8si even when _mm256_setzero_si256 builds __v4di rather than __v8si. And the last thing to consider is if sse-22.c shouldn't have avx5124fmaps,avx5124vnniw added to #pragma GCC target ("avx,avx2,rdrnd,fsgsbase,f16c,rtm,avx512f,avx512er,avx512cd,avx512pf,sha,avx512vl,avx512bw,avx512dq,avx512ifma,avx512vbmi")