| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-mamx-tile -mamx-complex -O0" } */ |
| 3 |
/* { dg-final { scan-assembler "tcmmimfp16ps\[ \\t]+%tmm2,\[ \\t\]*%tmm1,\[ \\t\]*%tmm0" } } */ |
| 4 |
/* { dg-final { scan-assembler "tcmmrlfp16ps\[ \\t]+%tmm5,\[ \\t\]*%tmm4,\[ \\t\]*%tmm3" } } */ |
| 5 |
|
| 6 |
#include <immintrin.h> |
| 7 |
|
| 8 |
template <int dst, int src1, int src2> |
| 9 |
struct cmmimfp16ps |
| 10 |
{ |
| 11 |
void operator()() { _tile_cmmimfp16ps(dst, src1, src2); } |
| 12 |
}; |
| 13 |
|
| 14 |
template <int dst, int src1, int src2> |
| 15 |
struct cmmrlfp16ps |
| 16 |
{ |
| 17 |
void operator()() { _tile_cmmrlfp16ps(dst, src1, src2); } |
| 18 |
}; |
| 19 |
|
| 20 |
void test_amx_complex() |
| 21 |
{ |
| 22 |
cmmimfp16ps<0, 1, 2>()(); |
| 23 |
cmmrlfp16ps<3, 4, 5>()(); |
| 24 |
} |