| /* { dg-do compile } */ |
| /* { dg-options "-mavx512fp16 -mavx512vl -O2" } */ |
| /* { dg-final { scan-assembler-times "vrcpph\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| /* { dg-final { scan-assembler-times "vrcpph\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */ |
| /* { dg-final { scan-assembler-times "vrcpph\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| /* { dg-final { scan-assembler-times "vrcpph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| /* { dg-final { scan-assembler-times "vrcpph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */ |
| /* { dg-final { scan-assembler-times "vrcpph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| |
| #include <immintrin.h> |
| |
| volatile __m256h res1; |
| volatile __m128h res2; |
| volatile __m256h x1; |
| volatile __m128h x2; |
| volatile __mmask16 m16; |
| volatile __mmask8 m8; |
| |
| void extern |
| avx512f_test (void) |
| { |
| res1 = _mm256_rcp_ph (x1); |
| res1 = _mm256_mask_rcp_ph (res1, m16, x1); |
| res1 = _mm256_maskz_rcp_ph (m16, x1); |
| |
| res2 = _mm_rcp_ph (x2); |
| res2 = _mm_mask_rcp_ph (res2, m8, x2); |
| res2 = _mm_maskz_rcp_ph (m8, x2); |
| } |