1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv_zvfh_zvl4096b -mabi=lp64d -O3 -fno-schedule-insns -fno-schedule-insns2" } */
7 spill_0 (int16_t *in
, int16_t *out
)
10 exhaust_vector_regs ();
11 asm volatile ("" ::: "memory");
16 spill_1 (int16_t *in
, int16_t *out
)
19 exhaust_vector_regs ();
20 asm volatile ("" ::: "memory");
25 spill_2 (int16_t *in
, int16_t *out
)
28 exhaust_vector_regs ();
29 asm volatile ("" ::: "memory");
34 spill_3 (int16_t *in
, int16_t *out
)
37 exhaust_vector_regs ();
38 asm volatile ("" ::: "memory");
43 spill_4 (int16_t *in
, int16_t *out
)
45 v16hi v1
= *(v16hi
*)in
;
46 exhaust_vector_regs ();
47 asm volatile ("" ::: "memory");
52 spill_5 (int16_t *in
, int16_t *out
)
54 v32hi v1
= *(v32hi
*)in
;
55 exhaust_vector_regs ();
56 asm volatile ("" ::: "memory");
61 spill_6 (int16_t *in
, int16_t *out
)
63 v64hi v1
= *(v64hi
*)in
;
64 exhaust_vector_regs ();
65 asm volatile ("" ::: "memory");
70 spill_7 (int16_t *in
, int16_t *out
)
72 v128hi v1
= *(v128hi
*)in
;
73 exhaust_vector_regs ();
74 asm volatile ("" ::: "memory");
79 spill_8 (int16_t *in
, int16_t *out
)
81 v256hi v1
= *(v256hi
*)in
;
82 exhaust_vector_regs ();
83 asm volatile ("" ::: "memory");
88 spill_9 (int16_t *in
, int16_t *out
)
90 v512hi v1
= *(v512hi
*)in
;
91 exhaust_vector_regs ();
92 asm volatile ("" ::: "memory");
97 spill_10 (int16_t *in
, int16_t *out
)
99 v1024hi v1
= *(v1024hi
*)in
;
100 exhaust_vector_regs ();
101 asm volatile ("" ::: "memory");
106 spill_11 (int16_t *in
, int16_t *out
)
108 v2048hi v1
= *(v2048hi
*)in
;
109 exhaust_vector_regs ();
110 asm volatile ("" ::: "memory");
114 /* { dg-final { scan-assembler-times {vle16\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 24 } } */
115 /* { dg-final { scan-assembler-times {vse16\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 24 } } */
116 /* { dg-final { scan-assembler-times {addi\tsp,sp,-16} 4 } } */
117 /* { dg-final { scan-assembler-times {addi\tsp,sp,-32} 1 } } */
118 /* { dg-final { scan-assembler-times {addi\tsp,sp,-64} 1 } } */
119 /* { dg-final { scan-assembler-times {addi\tsp,sp,-128} 1 } } */
120 /* { dg-final { scan-assembler-times {addi\tsp,sp,-256} 1 } } */
121 /* { dg-final { scan-assembler-times {addi\tsp,sp,-512} 1 } } */
122 /* { dg-final { scan-assembler-times {addi\tsp,sp,-1024} 1 } } */
123 /* { dg-final { scan-assembler-times {addi\tsp,sp,-2048} 1 } } */
124 /* { dg-final { scan-assembler-times {li\t[a-x0-9]+,-4096\s+add\tsp,sp,[a-x0-9]+} 1 } } */