Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/pcs/gnu_vectors_3.c

raw
1 /* { dg-options "-O -msve-vector-bits=256" } */
2
3 typedef unsigned char int8x4_t __attribute__((vector_size (4)));
4
5 /*
6 ** passthru_x0:
7 ** ret
8 */
9 int8x4_t passthru_x0 (int8x4_t x0) { return x0; }
10
11 /*
12 ** passthru_x1:
13 ** mov w0, w1
14 ** ret
15 */
16 int8x4_t passthru_x1 (int8x4_t x0, int8x4_t x1) { return x1; }
17
18 int8x4_t load (int8x4_t *x0) { return *x0; }
19
20 void store (int8x4_t *x0, int8x4_t x1) { *x0 = x1; }
21
22 /*
23 ** stack_callee:
24 ** ptrue p[0-7], vl32
25 ** ld1b (z[0-9]+\.d), \1/z, \[sp\]
26 ** st1b \2, \1, \[x0\]
27 ** ret
28 */
29 __attribute__((noipa))
30 void stack_callee (int8x4_t *x0, int8x4_t x1, int8x4_t x2, int8x4_t x3,
31 int8x4_t x4, int8x4_t x5, int8x4_t x6, int8x4_t x7,
32 int8x4_t stack0)
33 {
34 *x0 = stack0;
35 }
36
37 /*
38 ** stack_callee:
39 ** \.\.\.
40 ** ptrue p[0-7], vl32
41 ** \.\.\.
42 ** ld1b (z[0-9]+\.d), \1/z, \[x0\]
43 ** \.\.\.
44 ** st1b \2, \1, \[sp\]
45 ** \.\.\.
46 ** ret
47 */
48 void stack_caller (int8x4_t *x0, int8x4_t x1)
49 {
50 stack_callee (x0, x1, x1, x1, x1, x1, x1, x1, *x0);
51 }
52
53 /* { dg-final { scan-assembler {\tmov\tw2, w} } } */
54 /* { dg-final { scan-assembler {\tmov\tw3, w} } } */
55 /* { dg-final { scan-assembler {\tmov\tw4, w} } } */
56 /* { dg-final { scan-assembler {\tmov\tw5, w} } } */
57 /* { dg-final { scan-assembler {\tmov\tw6, w} } } */
58 /* { dg-final { scan-assembler {\tmov\tw7, w} } } */