| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-mamx-tile -mamx-int8 -O0" } */ |
| 3 |
/* { dg-final { scan-assembler "tdpbssd\[ \\t]+%tmm2,\[ \\t\]*%tmm1,\[ \\t\]*%tmm0" } } */ |
| 4 |
/* { dg-final { scan-assembler "tdpbsud\[ \\t]+%tmm5,\[ \\t\]*%tmm4,\[ \\t\]*%tmm3" } } */ |
| 5 |
/* { dg-final { scan-assembler "tdpbusd\[ \\t]+%tmm2,\[ \\t\]*%tmm1,\[ \\t\]*%tmm6" } } */ |
| 6 |
/* { dg-final { scan-assembler "tdpbuud\[ \\t]+%tmm1,\[ \\t\]*%tmm0,\[ \\t\]*%tmm7" } } */ |
| 7 |
|
| 8 |
#include <immintrin.h> |
| 9 |
|
| 10 |
template <int dst, int src1, int src2> |
| 11 |
struct dpbssd |
| 12 |
{ |
| 13 |
void operator()() { _tile_dpbssd(dst, src1, src2); } |
| 14 |
}; |
| 15 |
|
| 16 |
template <int dst, int src1, int src2> |
| 17 |
struct dpbsud |
| 18 |
{ |
| 19 |
void operator()() { _tile_dpbsud(dst, src1, src2); } |
| 20 |
}; |
| 21 |
|
| 22 |
template <int dst, int src1, int src2> |
| 23 |
struct dpbusd |
| 24 |
{ |
| 25 |
void operator()() { _tile_dpbusd(dst, src1, src2); } |
| 26 |
}; |
| 27 |
|
| 28 |
template <int dst, int src1, int src2> |
| 29 |
struct dpbuud |
| 30 |
{ |
| 31 |
void operator()() { _tile_dpbuud(dst, src1, src2); } |
| 32 |
}; |
| 33 |
|
| 34 |
void test_amx_int8() |
| 35 |
{ |
| 36 |
dpbssd<0, 1, 2>()(); |
| 37 |
dpbsud<3, 4, 5>()(); |
| 38 |
dpbusd<6, 1, 2>()(); |
| 39 |
dpbuud<7, 0, 1>()(); |
| 40 |
} |