Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/spill-6.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 (float *in, float *out)
8 {
9 v1sf v1 = *(v1sf*)in;
10 exhaust_vector_regs ();
11 asm volatile ("" ::: "memory");
12 *(v1sf*)out = v1;
13 }
14
15 void
16 spill_1 (float *in, float *out)
17 {
18 v2sf v1 = *(v2sf*)in;
19 exhaust_vector_regs ();
20 asm volatile ("" ::: "memory");
21 *(v2sf*)out = v1;
22 }
23
24 void
25 spill_2 (float *in, float *out)
26 {
27 v4sf v1 = *(v4sf*)in;
28 exhaust_vector_regs ();
29 asm volatile ("" ::: "memory");
30 *(v4sf*)out = v1;
31 }
32
33 void
34 spill_3 (float *in, float *out)
35 {
36 v8sf v1 = *(v8sf*)in;
37 exhaust_vector_regs ();
38 asm volatile ("" ::: "memory");
39 *(v8sf*)out = v1;
40 }
41
42 void
43 spill_4 (float *in, float *out)
44 {
45 v16sf v1 = *(v16sf*)in;
46 exhaust_vector_regs ();
47 asm volatile ("" ::: "memory");
48 *(v16sf*)out = v1;
49 }
50
51 void
52 spill_5 (float *in, float *out)
53 {
54 v32sf v1 = *(v32sf*)in;
55 exhaust_vector_regs ();
56 asm volatile ("" ::: "memory");
57 *(v32sf*)out = v1;
58 }
59
60 void
61 spill_6 (float *in, float *out)
62 {
63 v64sf v1 = *(v64sf*)in;
64 exhaust_vector_regs ();
65 asm volatile ("" ::: "memory");
66 *(v64sf*)out = v1;
67 }
68
69 void
70 spill_7 (float *in, float *out)
71 {
72 v128sf v1 = *(v128sf*)in;
73 exhaust_vector_regs ();
74 asm volatile ("" ::: "memory");
75 *(v128sf*)out = v1;
76 }
77
78 void
79 spill_8 (float *in, float *out)
80 {
81 v256sf v1 = *(v256sf*)in;
82 exhaust_vector_regs ();
83 asm volatile ("" ::: "memory");
84 *(v256sf*)out = v1;
85 }
86
87 void
88 spill_9 (float *in, float *out)
89 {
90 v512sf v1 = *(v512sf*)in;
91 exhaust_vector_regs ();
92 asm volatile ("" ::: "memory");
93 *(v512sf*)out = v1;
94 }
95
96 void
97 spill_10 (float *in, float *out)
98 {
99 v1024sf v1 = *(v1024sf*)in;
100 exhaust_vector_regs ();
101 asm volatile ("" ::: "memory");
102 *(v1024sf*)out = v1;
103 }
104
105 /* { dg-final { scan-assembler-times {vle32\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 22 } } */
106 /* { dg-final { scan-assembler-times {vse32\.v\tv[0-9]+,0\s*\([a-x0-9]+\)} 22 } } */
107 /* { dg-final { scan-assembler-times {addi\tsp,sp,-16} 3 } } */
108 /* { dg-final { scan-assembler-times {addi\tsp,sp,-32} 1 } } */
109 /* { dg-final { scan-assembler-times {addi\tsp,sp,-64} 1 } } */
110 /* { dg-final { scan-assembler-times {addi\tsp,sp,-128} 1 } } */
111 /* { dg-final { scan-assembler-times {addi\tsp,sp,-256} 1 } } */
112 /* { dg-final { scan-assembler-times {addi\tsp,sp,-512} 1 } } */
113 /* { dg-final { scan-assembler-times {addi\tsp,sp,-1024} 1 } } */
114 /* { dg-final { scan-assembler-times {addi\tsp,sp,-2048} 3 } } */
115 /* { dg-final { scan-assembler-times {addi\tsp,sp,2032} 1 } } */