| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mavx512fp16 -mavx512vl" } */ |
| 3 |
/* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to4\\\}" 2 } } */ |
| 4 |
/* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 2 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to16\\\}" 2 } } */ |
| 6 |
|
| 7 |
#include <immintrin.h> |
| 8 |
|
| 9 |
volatile __m512h res0, a0, c0; |
| 10 |
volatile __m256h res1, a1, c1; |
| 11 |
volatile __m128h res2, a2, c2; |
| 12 |
volatile _Float16 *b; |
| 13 |
|
| 14 |
void extern |
| 15 |
avx_test(void) |
| 16 |
{ |
| 17 |
res0 = _mm512_fmadd_pch (a0, _mm512_set1_pch(*(b + 2 * 6)), c0); |
| 18 |
res0 = _mm512_fcmadd_pch (a0, _mm512_set1_pch(*(b + 2 * 6)), c0); |
| 19 |
|
| 20 |
res1 = _mm256_fmadd_pch (a1, _mm256_set1_pch(*(b + 2 * 6)), c1); |
| 21 |
res1 = _mm256_fcmadd_pch (a1, _mm256_set1_pch(*(b + 2 * 6)), c1); |
| 22 |
|
| 23 |
res2 = _mm_fmadd_pch (a2, _mm_set1_pch(*(b + 2 * 6)), c2); |
| 24 |
res2 = _mm_fcmadd_pch (a2, _mm_set1_pch(*(b + 2 * 6)), c2); |
| 25 |
} |