Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/vector/lsx/pr123766.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mlsx -Werror -Wextra" } */
3
4 #include <lsxintrin.h>
5
6 __m128i v = {0, 0};
7
8 #define TEST(NAME) \
9 void test_##NAME (void) \
10 { \
11 long long r[2]; \
12 __lsx_##NAME (v, r, 0); \
13 }
14
15 TEST (vst);
16 TEST (vstx);
17
18 #define TEST1(NAME, TYPE, NUM) \
19 void test_##NAME (void) \
20 { \
21 TYPE r[NUM]; \
22 __lsx_##NAME (v, r, 0, 0); \
23 }
24
25 TEST1 (vstelm_b, char, 16);
26 TEST1 (vstelm_h, short, 8);
27 TEST1 (vstelm_w, int, 4);
28 TEST1 (vstelm_d, long long, 2);