1 ; RUN: llc --mtriple=armv7-eabihf %s -o - | FileCheck %s --enable-var-scope
3 %struct.S0 = type { [4 x float] }
4 %struct.S1 = type { [2 x float] }
5 %struct.S2 = type { [4 x float] }
6 %struct.D0 = type { [2 x double] }
7 %struct.D1 = type { [2 x double] }
8 %struct.D2 = type { [4 x double] }
11 declare dso_local float @f0_0(double, double, double, double, double, double, %struct.S0) local_unnamed_addr #0
12 define dso_local float @f0_0_call() local_unnamed_addr #0 {
14 %call = tail call float @f0_0(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, %struct.S0 { [4 x float] [float 0x3FE3333340000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] }) #0
17 ; CHECK-LABEL: f0_0_call:
18 ; CHECK: vldr s12, .L[[L:.*]]
21 ; CHECK-NEXT: .long 0x3f19999a
23 ; pass in memory, no split
24 declare dso_local float @f0_1(double, double, double, double, double, double, float, %struct.S0) local_unnamed_addr #0
25 define dso_local float @f0_1_call() local_unnamed_addr #0 {
27 %call = tail call float @f0_1(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, float 0x3FE3333340000000, %struct.S0 { [4 x float] [float 0x3FE6666660000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] }) #0
30 ; CHECK-LABEL: f0_1_call:
31 ; CHECK: movw r1, #13107
33 ; CHECK: movt r1, #16179
34 ; CHECK-DAG: str r1, [sp]
35 ; CHECK-DAG: str r0, [sp, #4]
36 ; CHECK-DAG: str r0, [sp, #8]
37 ; CHECK-DAG: str r0, [sp, #12]
40 ; pass memory, alignment 4
41 declare dso_local float @f0_2(double, double, double, double, double, double, double, double, float, %struct.S0) local_unnamed_addr #0
42 define dso_local float @f0_2_call() local_unnamed_addr #0 {
44 %call = tail call float @f0_2(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, float 0x3FE99999A0000000, %struct.S0 { [4 x float] [float 0x3FECCCCCC0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] }) #0
47 ; CHECK-LABEL: f0_2_call:
48 ; CHECK: movw r1, #26214
49 ; CHECK: movw r2, #52429
51 ; CHECK: movt r1, #16230
52 ; CHECK: movt r2, #16204
53 ; CHECK-DAG: str r2, [sp]
54 ; CHECK-DAG: str r1, [sp, #4]
55 ; CHECK-DAG: str r0, [sp, #8]
56 ; CHECK-DAG: str r0, [sp, #12]
57 ; CHECK-DAG: str r0, [sp, #16]
61 declare dso_local float @f1_0(double, double, double, double, double, double, double, %struct.S1 alignstack(8)) local_unnamed_addr #0
62 define dso_local float @f1_0_call() local_unnamed_addr #0 {
64 %call = tail call float @f1_0(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, %struct.S1 alignstack(8) { [2 x float] [float 0x3FE6666660000000, float 0.000000e+00] }) #0
67 ; CHECK-LABEL: f1_0_call:
68 ; CHECK-DAG: vldr s14, .L[[L0:.*]]
69 ; CHECK-DAG: vldr s15, .L[[L1:.*]]
72 ; CHECK-NEXT: .long 0x3f333333
74 ; CHECK-NEXT: .long 0x00000000
76 ; pass in memory, no split
77 declare dso_local float @f1_1(double, double, double, double, double, double, double, float, %struct.S1 alignstack(8)) local_unnamed_addr #0
78 define dso_local float @f1_1_call() local_unnamed_addr #0 {
80 %call = tail call float @f1_1(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, float 0x3FE6666660000000, %struct.S1 alignstack(8) { [2 x float] [float 0x3FE99999A0000000, float 0.000000e+00] }) #0
83 ; CHECK-LABEL: f1_1_call:
84 ; CHECK: movw r0, #52429
86 ; CHECK: movt r0, #16204
87 ; CHECK-DAG: strd r0, r1, [sp]
90 ; pass in memory, alignment 8
91 declare dso_local float @f1_2(double, double, double, double, double, double, double, double, float, %struct.S1 alignstack(8)) local_unnamed_addr #0
92 define dso_local float @f1_2_call() local_unnamed_addr #0 {
94 %call = tail call float @f1_2(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, float 0x3FE99999A0000000, %struct.S1 alignstack(8) { [2 x float] [float 0x3FECCCCCC0000000, float 0.000000e+00] }) #0
97 ; CHECK-LABEL: f1_2_call:
98 ; CHECK-DAG: movw r0, #26214
99 ; CHECK-DAG: mov r1, #0
100 ; CHECK: movt r0, #16230
101 ; CHECK: strd r0, r1, [sp, #8]
102 ; CHECK: movw r0, #52429
103 ; CHECK: movt r0, #16204
104 ; CHECK-DAG: str r0, [sp]
109 declare dso_local float @f2_0(double, double, double, double, double, double, %struct.S2 alignstack(8)) local_unnamed_addr #0
110 define dso_local float @f2_0_call() local_unnamed_addr #0 {
112 %call = tail call float @f2_0(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, %struct.S2 alignstack(8) { [4 x float] [float 0x3FE3333340000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] }) #0
115 ; CHECK-LABEL: f2_0_call:
116 ; CHECK-DAG: vldr s12, .L[[L0:.*]]
117 ; CHECK-DAG: vldr s13, .L[[L1:.*]]
118 ; CHECK-DAG: vmov.f32 s14, s13
119 ; CHECK-DAG: vmov.f32 s15, s13
122 ; CHECK-NEXT: .long 0x3f19999a
124 ; CHECK-NEXT: .long 0x00000000
126 ; pass in memory, no split
127 declare dso_local float @f2_1(double, double, double, double, double, double, float, %struct.S2 alignstack(8)) local_unnamed_addr #0
128 define dso_local float @f2_1_call() local_unnamed_addr #0 {
130 %call = tail call float @f2_1(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, float 0x3FE3333340000000, %struct.S2 alignstack(8) { [4 x float] [float 0x3FE6666660000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] }) #0
133 ; CHECK-LABEL: f2_1_call:
134 ; CHECK: movw r1, #13107
136 ; CHECK: movt r1, #16179
137 ; CHECK: str r1, [sp]
138 ; CHECK: str r0, [sp, #4]
139 ; CHECK: vldr s12, .L[[L:.*]]
140 ; CHECK: str r0, [sp, #8]
141 ; CHECK: str r0, [sp, #12]
144 ; CHECK-NEXT: .long 0x3f19999a
146 ; pass in memory, alignment 8
147 declare dso_local float @f2_2(double, double, double, double, double, double, double, double, float, %struct.S2 alignstack(8)) local_unnamed_addr #0
148 define dso_local float @f2_2_call() local_unnamed_addr #0 {
150 %call = tail call float @f2_2(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, float 0x3FE99999A0000000, %struct.S2 alignstack(8) { [4 x float] [float 0x3FECCCCCC0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] }) #0
153 ; CHECK-LABEL: f2_2_call:
155 ; CHECK: movw r1, #26214
156 ; CHECK: str r0, [sp, #12]
157 ; CHECK: str r0, [sp, #16]
158 ; CHECK: movt r1, #16230
159 ; CHECK: str r0, [sp, #20]
160 ; CHECK: movw r0, #52429
161 ; CHECK: movt r0, #16204
162 ; CHECK: str r1, [sp, #8]
163 ; CHECK: str r0, [sp]
167 declare dso_local double @g0_0(double, double, double, double, double, double, %struct.D0) local_unnamed_addr #0
168 define dso_local double @g0_0_call() local_unnamed_addr #0 {
170 %call = tail call double @g0_0(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, %struct.D0 { [2 x double] [double 6.000000e-01, double 0.000000e+00] }) #0
173 ; CHECK-LABEL: g0_0_call:
174 ; CHECK: vldr d6, .L[[L:.*]]
177 ; CHECK-NEXT: long 858993459
178 ; CHECK-NEXT: long 1071854387
180 ; pass in memory, no split
181 declare dso_local double @g0_1(double, double, double, double, double, double, double, %struct.D0) local_unnamed_addr #0
182 define dso_local double @g0_1_call() local_unnamed_addr #0 {
184 %call = tail call double @g0_1(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, %struct.D0 { [2 x double] [double 0x3FE6666666666666, double 0.000000e+00] }) #0
187 ; CHECK-LABEL: g0_1_call:
188 ; CHECK: movw r0, #26214
189 ; CHECK: movw r1, #26214
191 ; CHECK: movt r0, #16358
192 ; CHECK: movt r1, #26214
193 ; CHECK: str r1, [sp]
194 ; CHECK: stmib sp, {r0, r2}
195 ; CHECK: str r2, [sp, #12]
198 ; pass in memory, alignment 8
199 declare dso_local double @g0_2(double, double, double, double, double, double, double, double, float, %struct.D0) local_unnamed_addr #0
200 define dso_local double @g0_2_call() local_unnamed_addr #0 {
202 %call = tail call double @g0_2(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, float 0x3FE99999A0000000, %struct.D0 { [2 x double] [double 9.000000e-01, double 0.000000e+00] }) #0
205 ; CHECK-LABEL: g0_2_call:
206 ; CHECK: movw r0, #52428
207 ; CHECK: movt r0, #16364
208 ; CHECK: movw r1, #52429
209 ; CHECK: str r0, [sp, #12]
210 ; CHECK: movw r0, #52429
212 ; CHECK: movt r1, #52428
213 ; CHECK: movt r0, #16204
214 ; CHECK: str r1, [sp, #8]
215 ; CHECK: str r2, [sp, #16]
216 ; CHECK: str r2, [sp, #20]
217 ; CHECK: str r0, [sp]
221 declare dso_local double @g1_0(double, double, double, double, double, double, %struct.D1 alignstack(8)) local_unnamed_addr #0
222 define dso_local double @g1_0_call() local_unnamed_addr #0 {
224 %call = tail call double @g1_0(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, %struct.D1 alignstack(8) { [2 x double] [double 6.000000e-01, double 0.000000e+00] }) #0
227 ; CHECK-LABEL: g1_0_call:
228 ; CHECK-DAG: vmov.i32 d7, #0x0
229 ; CHECK-DAG: vldr d6, .L[[L:.*]]
232 ; CHECK-NEXT: .long 858993459
233 ; CHECK-NEXT: .long 107185438
235 ; pass in memory, no split
236 declare dso_local double @g1_1(double, double, double, double, double, double, double, %struct.D1 alignstack(8)) local_unnamed_addr #0
237 define dso_local double @g1_1_call() local_unnamed_addr #0 {
239 %call = tail call double @g1_1(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, %struct.D1 alignstack(8) { [2 x double] [double 0x3FE6666666666666, double 0.000000e+00] }) #0
242 ; CHECK-LABEL: g1_1_call:
243 ; CHECK: movw r0, #26214
244 ; CHECK: movw r1, #26214
246 ; CHECK: movt r0, #16358
247 ; CHECK: movt r1, #26214
248 ; CHECK: str r1, [sp]
249 ; CHECK: stmib sp, {r0, r2}
250 ; CHECK: str r2, [sp, #12]
253 ; pass in memory, alignment 8
254 declare dso_local double @g1_2(double, double, double, double, double, double, double, double, float, %struct.D1 alignstack(8)) local_unnamed_addr #0
255 define dso_local double @g1_2_call() local_unnamed_addr #0 {
257 %call = tail call double @g1_2(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, float 0x3FE99999A0000000, %struct.D1 alignstack(8) { [2 x double] [double 9.000000e-01, double 0.000000e+00] }) #0
260 ; CHECK-LABEL: g1_2_call:
261 ; CHECK: movw r0, #52428
262 ; CHECK: movt r0, #16364
263 ; CHECK: movw r1, #52429
264 ; CHECK: str r0, [sp, #12]
265 ; CHECK: movw r0, #52429
267 ; CHECK: movt r1, #52428
268 ; CHECK: movt r0, #16204
269 ; CHECK: str r1, [sp, #8]
270 ; CHECK: str r2, [sp, #16]
271 ; CHECK: str r2, [sp, #20]
272 ; CHECK: str r0, [sp]
276 declare dso_local double @g2_0(double, double, double, double, %struct.D2 alignstack(8)) local_unnamed_addr #0
277 define dso_local double @g2_0_call() local_unnamed_addr #0 {
279 %call = tail call double @g2_0(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, %struct.D2 alignstack(8) { [4 x double] [double 4.000000e-01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00] }) #0
282 ; CHECK-LABEL: g2_0_call:
283 ; CHECK-DAG: vldr d4, .L[[L:.*]]
284 ; CHECK-DAG: vmov.i32 d5, #0x0
285 ; CHECK-DAG: vmov.i32 d6, #0x0
286 ; CHECK-DAG: vmov.i32 d7, #0x0
289 ; CHECK-NEXT: .long 2576980378
290 ; CHECK-NEXT: .long 1071225241
292 ; pass in memory, no split
293 ; [sp] [sp + 4] = 0x00000000 0x3fe00000 = .5
294 ; [sp + 8] [sp + 12] = 0 0 = .0
296 declare dso_local double @g2_1(double, double, double, double, double, %struct.D2 alignstack(8)) local_unnamed_addr #0
297 define dso_local double @g2_1_call() local_unnamed_addr #0 {
299 %call = tail call double @g2_1(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, %struct.D2 alignstack(8) { [4 x double] [double 5.000000e-01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00] }) #0
302 ; CHECK-LABEL: g2_1_call:
303 ; CHECK: vmov.f64 d16, #5.000000e-01
305 ; CHECK: str r0, [sp, #8]
306 ; CHECK: str r0, [sp, #12]
307 ; CHECK: str r0, [sp, #16]
308 ; CHECK: vmov.i32 d0, #0x0
309 ; CHECK: str r0, [sp, #20]
310 ; CHECK: str r0, [sp, #24]
311 ; CHECK: str r0, [sp, #28]
312 ; CHECK: vstr d16, [sp]
315 ; pass in memory, alignment 8
316 declare dso_local double @g2_2(double, double, double, double, double, double, double, double, float, %struct.D2 alignstack(8)) local_unnamed_addr #0
317 define dso_local double @g2_2call() local_unnamed_addr #0 {
319 %call = tail call double @g2_2(double 0.000000e+00, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, float 0x3FE99999A0000000, %struct.D2 alignstack(8) { [4 x double] [double 9.000000e-01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00] }) #0
322 ; CHECK-LABEL: g2_2call:
323 ; CHECK: movw r0, #52428
324 ; CHECK: movt r0, #16364
325 ; CHECK: movw r1, #52429
326 ; CHECK: str r0, [sp, #12]
327 ; CHECK: movw r0, #52429
329 ; CHECK: movt r1, #52428
330 ; CHECK: movt r0, #16204
331 ; CHECK: str r1, [sp, #8]
332 ; CHECK: str r2, [sp, #16]
333 ; CHECK: str r2, [sp, #20]
334 ; CHECK: str r2, [sp, #24]
335 ; CHECK: str r2, [sp, #28]
336 ; CHECK: str r2, [sp, #32]
337 ; CHECK: str r2, [sp, #36]
338 ; CHECK: str r0, [sp]
341 attributes #0 = { nounwind "target-cpu"="generic" "target-features"="+armv7-a,+d32,+dsp,+fp64,+neon,+strict-align,+vfp2,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,-thumb-mode" }