1 /* { dg-do compile } */ 2 /* { dg-options "-mavx512vl -mavx512cd -O2" } */ 3 /* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ 4 /* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1} } */ 5 /* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ 6 /* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ 7 /* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1} } */ 8 /* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ 9 10 #include <immintrin.h> 11 12 volatile __m256i s; 13 volatile __m256i res; 14 volatile __m128i s2; 15 volatile __m128i res2; 16 17 void extern avx512vl_test(void)18avx512vl_test (void) 19 { 20 res = _mm256_lzcnt_epi32 (s); 21 res = _mm256_mask_lzcnt_epi32 (res, 2, s); 22 res = _mm256_maskz_lzcnt_epi32 (2, s); 23 res2 = _mm_lzcnt_epi32 (s2); 24 res2 = _mm_mask_lzcnt_epi32 (res2, 2, s2); 25 res2 = _mm_maskz_lzcnt_epi32 (2, s2); 26 } 27