https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85833
--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Wojciech Mula from comment #0) > There is a simple function, which checks if there is any non-zero element > in a vector: > > ---ktest.c--- > #include <immintrin.h> > > int anynonzero_epi32(__m512i x) { > const __m512i zero = _mm512_setzero_si512(); > const __mmask16 mask = _mm512_cmpneq_epi32_mask(x, zero); > return mask != 0; > } > ---eof--- > > $ gcc --version > gcc (Debian 7.3.0-16) 7.3.0 > > $ gcc -O2 -S -mavx512f ktest.c && cat ktest.s ktestw is AVX512DQ instruction.