Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/spill-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv_zvfh_zvl4096b -mabi=lp64d -mrvv-max-lmul=m8 -O3 -fno-schedule-insns -fno-schedule-insns2" } */
3
4 #include "def.h"
5
6 void
7 spill_0 (int8_t *in, int8_t *out)
8 {
9 v1qi v1 = *(v1qi*)in;
10 exhaust_vector_regs ();
11 asm volatile ("" ::: "memory");
12 *(v1qi*)out = v1;
13 }
14
15 void
16 spill_1 (int8_t *in, int8_t *out)
17 {
18 v2qi v1 = *(v2qi*)in;
19 exhaust_vector_regs ();
20 asm volatile ("" ::: "memory");
21 *(v2qi*)out = v1;
22 }
23
24 void
25 spill_2 (int8_t *in, int8_t *out)
26 {
27 v4qi v1 = *(v4qi*)in;
28 exhaust_vector_regs ();
29 asm volatile ("" ::: "memory");
30 *(v4qi*)out = v1;
31 }
32
33 void
34 spill_3 (int8_t *in, int8_t *out)
35 {
36 v8qi v1 = *(v8qi*)in;
37 exhaust_vector_regs ();
38 asm volatile ("" ::: "memory");
39 *(v8qi*)out = v1;
40 }
41
42 void
43 spill_4 (int8_t *in, int8_t *out)
44 {
45 v16qi v1 = *(v16qi*)in;
46 exhaust_vector_regs ();
47 asm volatile ("" ::: "memory");
48 *(v16qi*)out = v1;
49 }
50
51 void
52 spill_5 (int8_t *in, int8_t *out)
53 {
54 v32qi v1 = *(v32qi*)in;
55 exhaust_vector_regs ();
56 asm volatile ("" ::: "memory");
57 *(v32qi*)out = v1;
58 }
59
60 void
61 spill_6 (int8_t *in, int8_t *out)
62 {
63 v64qi v1 = *(v64qi*)in;
64 exhaust_vector_regs ();
65 asm volatile ("" ::: "memory");
66 *(v64qi*)out = v1;
67 }
68
69 void
70 spill_7 (int8_t *in, int8_t *out)
71 {
72 v128qi v1 = *(v128qi*)in;
73 exhaust_vector_regs ();
74 asm volatile ("" ::: "memory");
75 *(v128qi*)out = v1;
76 }
77
78 void
79 spill_8 (int8_t *in, int8_t *out)
80 {
81 v256qi v1 = *(v256qi*)in;
82 exhaust_vector_regs ();
83 asm volatile ("" ::: "memory");
84 *(v256qi*)out = v1;
85 }
86
87 void
88 spill_9 (int8_t *in, int8_t *out)
89 {
90 v512qi v1 = *(v512qi*)in;
91 exhaust_vector_regs ();
92 asm volatile ("" ::: "memory");
93 *(v512qi*)out = v1;
94 }
95
96 void
97 spill_10 (int8_t *in, int8_t *out)
98 {
99 v1024qi v1 = *(v1024qi*)in;
100 exhaust_vector_regs ();
101 asm volatile ("" ::: "memory");
102 *(v1024qi*)out = v1;
103 }
104
105 void
106 spill_11 (int8_t *in, int8_t *out)
107 {
108 v2048qi v1 = *(v2048qi*)in;
109 exhaust_vector_regs ();
110 asm volatile ("" ::: "memory");
111 *(v2048qi*)out = v1;
112 }
113
114 void
115 spill_12 (int8_t *in, int8_t *out)
116 {
117 v4096qi v1 = *(v4096qi*)in;
118 exhaust_vector_regs ();
119 asm volatile ("" ::: "memory");
120 *(v4096qi*)out = v1;
121 }
122
123 /* { dg-final { scan-assembler-times {vle8\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 26 } } */
124 /* { dg-final { scan-assembler-times {vse8\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 26 } } */
125 /* { dg-final { scan-assembler-times {addi\tsp,sp,-16} 5 } } */
126 /* { dg-final { scan-assembler-times {addi\tsp,sp,-32} 1 } } */
127 /* { dg-final { scan-assembler-times {addi\tsp,sp,-64} 1 } } */
128 /* { dg-final { scan-assembler-times {addi\tsp,sp,-128} 1 } } */
129 /* { dg-final { scan-assembler-times {addi\tsp,sp,-256} 1 } } */
130 /* { dg-final { scan-assembler-times {addi\tsp,sp,-512} 1 } } */
131 /* { dg-final { scan-assembler-times {addi\tsp,sp,-1024} 1 } } */
132 /* { dg-final { scan-assembler-times {addi\tsp,sp,-2048} 3 } } */
133 /* { dg-final { scan-assembler-times {addi\tsp,sp,2032} 1 } } */