Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv_zvfh_zvl4096b -mabi=lp64d -O3 -fno-schedule-insns -fno-schedule-insns2 -mrvv-max-lmul=m8" } */
3
4 #include "def.h"
5
6 void
7 spill_0 (int64_t *in, int64_t *out)
8 {
9 v1df v1 = *(v1df*)in;
10 exhaust_vector_regs ();
11 asm volatile ("" ::: "memory");
12 *(v1df*)out = v1;
13 }
14
15 void
16 spill_1 (int64_t *in, int64_t *out)
17 {
18 v2df v1 = *(v2df*)in;
19 exhaust_vector_regs ();
20 asm volatile ("" ::: "memory");
21 *(v2df*)out = v1;
22 }
23
24 void
25 spill_2 (int64_t *in, int64_t *out)
26 {
27 v4df v1 = *(v4df*)in;
28 exhaust_vector_regs ();
29 asm volatile ("" ::: "memory");
30 *(v4df*)out = v1;
31 }
32
33 void
34 spill_3 (int64_t *in, int64_t *out)
35 {
36 v8df v1 = *(v8df*)in;
37 exhaust_vector_regs ();
38 asm volatile ("" ::: "memory");
39 *(v8df*)out = v1;
40 }
41
42 void
43 spill_4 (int64_t *in, int64_t *out)
44 {
45 v16df v1 = *(v16df*)in;
46 exhaust_vector_regs ();
47 asm volatile ("" ::: "memory");
48 *(v16df*)out = v1;
49 }
50
51 void
52 spill_5 (int64_t *in, int64_t *out)
53 {
54 v32df v1 = *(v32df*)in;
55 exhaust_vector_regs ();
56 asm volatile ("" ::: "memory");
57 *(v32df*)out = v1;
58 }
59
60 void
61 spill_6 (int64_t *in, int64_t *out)
62 {
63 v64df v1 = *(v64df*)in;
64 exhaust_vector_regs ();
65 asm volatile ("" ::: "memory");
66 *(v64df*)out = v1;
67 }
68
69 void
70 spill_7 (int64_t *in, int64_t *out)
71 {
72 v128df v1 = *(v128df*)in;
73 exhaust_vector_regs ();
74 asm volatile ("" ::: "memory");
75 *(v128df*)out = v1;
76 }
77
78 void
79 spill_8 (int64_t *in, int64_t *out)
80 {
81 v256df v1 = *(v256df*)in;
82 exhaust_vector_regs ();
83 asm volatile ("" ::: "memory");
84 *(v256df*)out = v1;
85 }
86
87 void
88 spill_9 (int64_t *in, int64_t *out)
89 {
90 v512df v1 = *(v512df*)in;
91 exhaust_vector_regs ();
92 asm volatile ("" ::: "memory");
93 *(v512df*)out = v1;
94 }
95
96 /* { dg-final { scan-assembler-times {vle64\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 20 } } */
97 /* { dg-final { scan-assembler-times {vse64\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 20 } } */
98 /* { dg-final { scan-assembler-times {addi\tsp,sp,-16} 2 } } */
99 /* { dg-final { scan-assembler-times {addi\tsp,sp,-32} 1 } } */
100 /* { dg-final { scan-assembler-times {addi\tsp,sp,-64} 1 } } */
101 /* { dg-final { scan-assembler-times {addi\tsp,sp,-128} 1 } } */
102 /* { dg-final { scan-assembler-times {addi\tsp,sp,-256} 1 } } */
103 /* { dg-final { scan-assembler-times {addi\tsp,sp,-512} 1 } } */
104 /* { dg-final { scan-assembler-times {addi\tsp,sp,-1024} 1 } } */
105 /* { dg-final { scan-assembler-times {addi\tsp,sp,-2048} 3 } } */
106 /* { dg-final { scan-assembler-times {addi\tsp,sp,2032} 1 } } */