Debian Codegraph @

gcc/testsuite/g++.target/i386/pr122446-amxmovrs.C

raw
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-mamx-tile -mamx-movrs -O0" } */
3 /* { dg-final { scan-assembler "tileloaddrs\[ \\t]+\[^\n\]*,\[ \\t\]*%tmm0" } } */
4 /* { dg-final { scan-assembler "tileloaddrst1\[ \\t]+\[^\n\]*,\[ \\t\]*%tmm1" } } */
5
6 #include <immintrin.h>
7
8 template <int tmm_num>
9 struct tile_loaddrs_test
10 {
11 void operator()(const void* base, int stride)
12 {
13 _tile_loaddrs(tmm_num, base, stride);
14 }
15 };
16
17 template <int tmm_num>
18 struct tile_loaddrst1_test
19 {
20 void operator()(const void* base, int stride)
21 {
22 _tile_loaddrst1(tmm_num, base, stride);
23 }
24 };
25
26 void test_amx_movrs()
27 {
28 char buf[1024];
29 tile_loaddrs_test<0>()(buf, 64);
30 tile_loaddrst1_test<1>()(buf, 64);
31 }