| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mavx512fp16 -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 4 |
/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 6 |
/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 7 |
/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 8 |
/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 9 |
|
| 10 |
#include <immintrin.h> |
| 11 |
|
| 12 |
volatile __m512h res, res1, res2; |
| 13 |
volatile __m512h x1, x2; |
| 14 |
volatile __mmask32 m32; |
| 15 |
|
| 16 |
void extern |
| 17 |
avx512f_test (void) |
| 18 |
{ |
| 19 |
res = _mm512_sub_ph (x1, x2); |
| 20 |
res1 = _mm512_mask_sub_ph (res1, m32, x1, x2); |
| 21 |
res2 = _mm512_maskz_sub_ph (m32, x1, x2); |
| 22 |
|
| 23 |
res = _mm512_sub_round_ph (x1, x2, 8); |
| 24 |
res1 = _mm512_mask_sub_round_ph (res1, m32, x1, x2, 8); |
| 25 |
res2 = _mm512_maskz_sub_round_ph (m32, x1, x2, 11); |
| 26 |
} |