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 r1, #52429
86 ; CHECK: movt r1, #16204
87 ; CHECK-DAG: str r1, [sp]
88 ; CHECK-DAG: str r0, [sp, #4]
91 ; pass in memory, alignment 8
92 declare dso_local float @f1_2(double, double, double, double, double, double, double, double, float, %struct.S1 alignstack(8)) local_unnamed_addr #0
93 define dso_local float @f1_2_call() local_unnamed_addr #0 {
95 %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
98 ; CHECK-LABEL: f1_2_call:
99 ; CHECK-DAG: mov r0, #0
100 ; CHECK-DAG: movw r1, #26214
101 ; CHECK: str r0, [sp, #12]
102 ; CHECK: movw r0, #52429
103 ; CHECK: movt r1, #16230
104 ; CHECK: movt r0, #16204
105 ; CHECK-DAG: str r1, [sp, #8]
106 ; CHECK-DAG: str r0, [sp]
111 declare dso_local float @f2_0(double, double, double, double, double, double, %struct.S2 alignstack(8)) local_unnamed_addr #0
112 define dso_local float @f2_0_call() local_unnamed_addr #0 {
114 %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
117 ; CHECK-LABEL: f2_0_call:
118 ; CHECK-DAG: vldr s12, .L[[L0:.*]]
119 ; CHECK-DAG: vldr s13, .L[[L1:.*]]
120 ; CHECK-DAG: vmov.f32 s14, s13
121 ; CHECK-DAG: vmov.f32 s15, s13
124 ; CHECK-NEXT: .long 0x3f19999a
126 ; CHECK-NEXT: .long 0x00000000
128 ; pass in memory, no split
129 declare dso_local float @f2_1(double, double, double, double, double, double, float, %struct.S2 alignstack(8)) local_unnamed_addr #0
130 define dso_local float @f2_1_call() local_unnamed_addr #0 {
132 %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
135 ; CHECK-LABEL: f2_1_call:
136 ; CHECK: movw r1, #13107
138 ; CHECK: movt r1, #16179
139 ; CHECK: str r1, [sp]
140 ; CHECK: str r0, [sp, #4]
141 ; CHECK: vldr s12, .L[[L:.*]]
142 ; CHECK: str r0, [sp, #8]
143 ; CHECK: str r0, [sp, #12]
146 ; CHECK-NEXT: .long 0x3f19999a
148 ; pass in memory, alignment 8
149 declare dso_local float @f2_2(double, double, double, double, double, double, double, double, float, %struct.S2 alignstack(8)) local_unnamed_addr #0
150 define dso_local float @f2_2_call() local_unnamed_addr #0 {
152 %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
155 ; CHECK-LABEL: f2_2_call:
157 ; CHECK: movw r1, #26214
158 ; CHECK: str r0, [sp, #12]
159 ; CHECK: str r0, [sp, #16]
160 ; CHECK: movt r1, #16230
161 ; CHECK: str r0, [sp, #20]
162 ; CHECK: movw r0, #52429
163 ; CHECK: movt r0, #16204
164 ; CHECK: str r1, [sp, #8]
165 ; CHECK: str r0, [sp]
169 declare dso_local double @g0_0(double, double, double, double, double, double, %struct.D0) local_unnamed_addr #0
170 define dso_local double @g0_0_call() local_unnamed_addr #0 {
172 %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
175 ; CHECK-LABEL: g0_0_call:
176 ; CHECK: vldr d6, .L[[L:.*]]
179 ; CHECK-NEXT: long 858993459
180 ; CHECK-NEXT: long 1071854387
182 ; pass in memory, no split
183 declare dso_local double @g0_1(double, double, double, double, double, double, double, %struct.D0) local_unnamed_addr #0
184 define dso_local double @g0_1_call() local_unnamed_addr #0 {
186 %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
189 ; CHECK-LABEL: g0_1_call:
190 ; CHECK: movw r0, #26214
191 ; CHECK: movw r1, #26214
193 ; CHECK: movt r0, #16358
194 ; CHECK: movt r1, #26214
195 ; CHECK: str r1, [sp]
196 ; CHECK: stmib sp, {r0, r2}
197 ; CHECK: str r2, [sp, #12]
200 ; pass in memory, alignment 8
201 declare dso_local double @g0_2(double, double, double, double, double, double, double, double, float, %struct.D0) local_unnamed_addr #0
202 define dso_local double @g0_2_call() local_unnamed_addr #0 {
204 %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
207 ; CHECK-LABEL: g0_2_call:
208 ; CHECK: movw r0, #52428
209 ; CHECK: movt r0, #16364
210 ; CHECK: movw r1, #52429
211 ; CHECK: str r0, [sp, #12]
212 ; CHECK: movw r0, #52429
214 ; CHECK: movt r1, #52428
215 ; CHECK: movt r0, #16204
216 ; CHECK: str r1, [sp, #8]
217 ; CHECK: str r2, [sp, #16]
218 ; CHECK: str r2, [sp, #20]
219 ; CHECK: str r0, [sp]
223 declare dso_local double @g1_0(double, double, double, double, double, double, %struct.D1 alignstack(8)) local_unnamed_addr #0
224 define dso_local double @g1_0_call() local_unnamed_addr #0 {
226 %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
229 ; CHECK-LABEL: g1_0_call:
230 ; CHECK-DAG: vmov.i32 d7, #0x0
231 ; CHECK-DAG: vldr d6, .L[[L:.*]]
234 ; CHECK-NEXT: .long 858993459
235 ; CHECK-NEXT: .long 107185438
237 ; pass in memory, no split
238 declare dso_local double @g1_1(double, double, double, double, double, double, double, %struct.D1 alignstack(8)) local_unnamed_addr #0
239 define dso_local double @g1_1_call() local_unnamed_addr #0 {
241 %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
244 ; CHECK-LABEL: g1_1_call:
245 ; CHECK: movw r0, #26214
246 ; CHECK: movw r1, #26214
248 ; CHECK: movt r0, #16358
249 ; CHECK: movt r1, #26214
250 ; CHECK: str r1, [sp]
251 ; CHECK: stmib sp, {r0, r2}
252 ; CHECK: str r2, [sp, #12]
255 ; pass in memory, alignment 8
256 declare dso_local double @g1_2(double, double, double, double, double, double, double, double, float, %struct.D1 alignstack(8)) local_unnamed_addr #0
257 define dso_local double @g1_2_call() local_unnamed_addr #0 {
259 %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
262 ; CHECK-LABEL: g1_2_call:
263 ; CHECK: movw r0, #52428
264 ; CHECK: movt r0, #16364
265 ; CHECK: movw r1, #52429
266 ; CHECK: str r0, [sp, #12]
267 ; CHECK: movw r0, #52429
269 ; CHECK: movt r1, #52428
270 ; CHECK: movt r0, #16204
271 ; CHECK: str r1, [sp, #8]
272 ; CHECK: str r2, [sp, #16]
273 ; CHECK: str r2, [sp, #20]
274 ; CHECK: str r0, [sp]
278 declare dso_local double @g2_0(double, double, double, double, %struct.D2 alignstack(8)) local_unnamed_addr #0
279 define dso_local double @g2_0_call() local_unnamed_addr #0 {
281 %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
284 ; CHECK-LABEL: g2_0_call:
285 ; CHECK-DAG: vldr d4, .L[[L:.*]]
286 ; CHECK-DAG: vmov.i32 d5, #0x0
287 ; CHECK-DAG: vmov.i32 d6, #0x0
288 ; CHECK-DAG: vmov.i32 d7, #0x0
291 ; CHECK-NEXT: .long 2576980378
292 ; CHECK-NEXT: .long 1071225241
294 ; pass in memory, no split
295 ; [sp] [sp + 4] = 0x00000000 0x3fe00000 = .5
296 ; [sp + 8] [sp + 12] = 0 0 = .0
298 declare dso_local double @g2_1(double, double, double, double, double, %struct.D2 alignstack(8)) local_unnamed_addr #0
299 define dso_local double @g2_1_call() local_unnamed_addr #0 {
301 %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
304 ; CHECK-LABEL: g2_1_call:
307 ; CHECK: movt r0, #16352
308 ; CHECK: str r1, [sp]
309 ; CHECK: stmib sp, {r0, r1}
310 ; CHECK: str r1, [sp, #12]
311 ; CHECK: str r1, [sp, #16]
312 ; CHECK: str r1, [sp, #20]
313 ; CHECK: str r1, [sp, #24]
314 ; CHECK: str r1, [sp, #28]
317 ; pass in memory, alignment 8
318 declare dso_local double @g2_2(double, double, double, double, double, double, double, double, float, %struct.D2 alignstack(8)) local_unnamed_addr #0
319 define dso_local double @g2_2call() local_unnamed_addr #0 {
321 %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
324 ; CHECK-LABEL: g2_2call:
325 ; CHECK: movw r0, #52428
326 ; CHECK: movt r0, #16364
327 ; CHECK: movw r1, #52429
328 ; CHECK: str r0, [sp, #12]
329 ; CHECK: movw r0, #52429
331 ; CHECK: movt r1, #52428
332 ; CHECK: movt r0, #16204
333 ; CHECK: str r1, [sp, #8]
334 ; CHECK: str r2, [sp, #16]
335 ; CHECK: str r2, [sp, #20]
336 ; CHECK: str r2, [sp, #24]
337 ; CHECK: str r2, [sp, #28]
338 ; CHECK: str r2, [sp, #32]
339 ; CHECK: str r2, [sp, #36]
340 ; CHECK: str r0, [sp]
343 attributes #0 = { nounwind "target-cpu"="generic" "target-features"="+armv7-a,+d32,+dsp,+fp64,+neon,+strict-align,+vfp2,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,-thumb-mode" }