1 ;RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=+neon -verify-machineinstrs -filetype=obj | llvm-objdump --no-print-imm-hex --triple=armv7-none-linux-gnueabi -d - | FileCheck %s --check-prefix=ARM
2 ;RUN: llc < %s -mtriple=thumbv7-none-linux-gnueabi -mattr=+neon -verify-machineinstrs -filetype=obj | llvm-objdump --no-print-imm-hex --triple=thumbv7-none-linux-gnueabi -d - | FileCheck %s --check-prefix=THUMB2
3 ;RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=-neon -verify-machineinstrs -filetype=obj | llvm-objdump --no-print-imm-hex --triple=armv7-none-linux-gnueabi -d - | FileCheck %s --check-prefix=NO_NEON
4 ;We want to have both positive and negative checks for thumb1. These checks
5 ;are not easy to do in a single pass so we generate the output once to a
6 ;temp file and run filecheck twice with different prefixes.
7 ;RUN: llc < %s -mtriple=thumbv5-none-linux-gnueabi -verify-machineinstrs -filetype=obj | llvm-objdump --no-print-imm-hex --triple=thumbv5-none-linux-gnueabi -d - > %t
8 ;RUN: cat %t | FileCheck %s --check-prefix=THUMB1
9 ;RUN: cat %t | FileCheck %s --check-prefix=T1POST
10 ;RUN: llc < %s -mtriple=thumbv8m.base-arm-none-eabi -verify-machineinstrs -filetype=obj | llvm-objdump --no-print-imm-hex --triple=thumbv8m.base-arm-none-eabi -d - > %t
11 ;RUN: cat %t | FileCheck %s --check-prefix=THUMB1
12 ;RUN: cat %t | FileCheck %s --check-prefix=T1POST
13 ;RUN: cat %t | FileCheck %s --check-prefix=V8MBASE
15 ;This file contains auto generated tests for the lowering of passing structs
16 ;byval in the arm backend. We have tests for both packed and unpacked
17 ;structs at varying alignments. Each test is run for arm, thumb2 and thumb1.
18 ;We check for the strings in the generated object code using llvm-objdump
19 ;because it provides better assurance that we are generating instructions
20 ;for the correct architecture. Otherwise we could accidentally generate an
21 ;ARM instruction for THUMB1 and wouldn't detect it because the assembly
22 ;code representation is the same, but the object code would be generated
23 ;incorrectly. For each test we check for the label, a load instruction of the
24 ;correct form, a branch if it will be generated with a loop, and the leftover
25 ;cleanup if the number of bytes does not divide evenly by the store size
27 %struct.A = type <{ [ 10 x i32 ] }> ; 40 bytes
28 declare void @use_A(ptr byval(%struct.A))
29 %struct.B = type <{ [ 10 x i32 ], i8 }> ; 41 bytes
30 declare void @use_B(ptr byval(%struct.B))
31 %struct.C = type <{ [ 10 x i32 ], [ 3 x i8 ] }> ; 43 bytes
32 declare void @use_C(ptr byval(%struct.C))
33 %struct.D = type <{ [ 100 x i32 ] }> ; 400 bytes
34 declare void @use_D(ptr byval(%struct.D))
35 %struct.E = type <{ [ 100 x i32 ], i8 }> ; 401 bytes
36 declare void @use_E(ptr byval(%struct.E))
37 %struct.F = type <{ [ 100 x i32 ], [ 3 x i8 ] }> ; 403 bytes
38 declare void @use_F(ptr byval(%struct.F))
39 %struct.G = type { [ 10 x i32 ] } ; 40 bytes
40 declare void @use_G(ptr byval(%struct.G))
41 %struct.H = type { [ 10 x i32 ], i8 } ; 41 bytes
42 declare void @use_H(ptr byval(%struct.H))
43 %struct.I = type { [ 10 x i32 ], [ 3 x i8 ] } ; 43 bytes
44 declare void @use_I(ptr byval(%struct.I))
45 %struct.J = type { [ 100 x i32 ] } ; 400 bytes
46 declare void @use_J(ptr byval(%struct.J))
47 %struct.K = type { [ 100 x i32 ], i8 } ; 401 bytes
48 declare void @use_K(ptr byval(%struct.K))
49 %struct.L = type { [ 100 x i32 ], [ 3 x i8 ] } ; 403 bytes
50 declare void @use_L(ptr byval(%struct.L))
51 %struct.M = type { [ 64 x i8 ] } ; 64 bytes
52 declare void @use_M(ptr byval(%struct.M))
53 %struct.N = type { [ 128 x i8 ] } ; 128 bytes
54 declare void @use_N(ptr byval(%struct.N))
56 ;ARM-LABEL: <test_A_1>:
57 ;THUMB2-LABEL: <test_A_1>:
58 ;NO_NEON-LABEL:<test_A_1>:
59 ;THUMB1-LABEL: <test_A_1>:
60 ;T1POST-LABEL: <test_A_1>:
61 define void @test_A_1() {
62 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
64 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
66 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
68 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
69 ;THUMB1: adds [[BASE]], #1
71 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
73 %a = alloca %struct.A, align 1
74 call void @use_A(ptr byval(%struct.A) align 1 %a)
77 ;ARM-LABEL: <test_A_2>:
78 ;THUMB2-LABEL: <test_A_2>:
79 ;NO_NEON-LABEL:<test_A_2>:
80 ;THUMB1-LABEL: <test_A_2>:
81 ;T1POST-LABEL: <test_A_2>:
82 define void @test_A_2() {
83 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
85 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
87 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
89 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
90 ;THUMB1: adds [[BASE]], #2
92 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
94 %a = alloca %struct.A, align 2
95 call void @use_A(ptr byval(%struct.A) align 2 %a)
98 ;ARM-LABEL: <test_A_4>:
99 ;THUMB2-LABEL: <test_A_4>:
100 ;NO_NEON-LABEL:<test_A_4>:
101 ;THUMB1-LABEL: <test_A_4>:
102 ;T1POST-LABEL: <test_A_4>:
103 define void @test_A_4() {
104 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
106 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
108 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
110 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
111 ;THUMB1: adds [[BASE]], #4
113 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
115 %a = alloca %struct.A, align 4
116 call void @use_A(ptr byval(%struct.A) align 4 %a)
119 ;ARM-LABEL: <test_A_8>:
120 ;THUMB2-LABEL: <test_A_8>:
121 ;NO_NEON-LABEL:<test_A_8>:
122 ;THUMB1-LABEL: <test_A_8>:
123 ;T1POST-LABEL: <test_A_8>:
124 define void @test_A_8() {
125 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
127 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
129 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
130 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
132 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
133 ;THUMB1: adds [[BASE]], #4
135 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
137 %a = alloca %struct.A, align 8
138 call void @use_A(ptr byval(%struct.A) align 8 %a)
141 ;ARM-LABEL: <test_A_16>:
142 ;THUMB2-LABEL: <test_A_16>:
143 ;NO_NEON-LABEL:<test_A_16>:
144 ;THUMB1-LABEL: <test_A_16>:
145 ;T1POST-LABEL: <test_A_16>:
146 define void @test_A_16() {
147 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
148 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
150 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
151 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
153 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
154 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
156 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
157 ;THUMB1: adds [[BASE]], #4
159 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
161 %a = alloca %struct.A, align 16
162 call void @use_A(ptr byval(%struct.A) align 16 %a)
165 ;ARM-LABEL: <test_B_1>:
166 ;THUMB2-LABEL: <test_B_1>:
167 ;NO_NEON-LABEL:<test_B_1>:
168 ;THUMB1-LABEL: <test_B_1>:
169 ;T1POST-LABEL: <test_B_1>:
170 define void @test_B_1() {
171 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
173 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
175 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
177 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
178 ;THUMB1: adds [[BASE]], #1
180 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
182 %a = alloca %struct.B, align 1
183 call void @use_B(ptr byval(%struct.B) align 1 %a)
186 ;ARM-LABEL: <test_B_2>:
187 ;THUMB2-LABEL: <test_B_2>:
188 ;NO_NEON-LABEL:<test_B_2>:
189 ;THUMB1-LABEL: <test_B_2>:
190 ;T1POST-LABEL: <test_B_2>:
191 define void @test_B_2() {
192 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
193 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
195 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
196 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
198 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
199 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
201 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
202 ;THUMB1: adds [[BASE]], #2
203 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
205 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
207 %a = alloca %struct.B, align 2
208 call void @use_B(ptr byval(%struct.B) align 2 %a)
211 ;ARM-LABEL: <test_B_4>:
212 ;THUMB2-LABEL: <test_B_4>:
213 ;NO_NEON-LABEL:<test_B_4>:
214 ;THUMB1-LABEL: <test_B_4>:
215 ;T1POST-LABEL: <test_B_4>:
216 define void @test_B_4() {
217 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
218 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
220 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
221 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
223 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
224 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
226 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
227 ;THUMB1: adds [[BASE]], #4
228 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
230 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
232 %a = alloca %struct.B, align 4
233 call void @use_B(ptr byval(%struct.B) align 4 %a)
236 ;ARM-LABEL: <test_B_8>:
237 ;THUMB2-LABEL: <test_B_8>:
238 ;NO_NEON-LABEL:<test_B_8>:
239 ;THUMB1-LABEL: <test_B_8>:
240 ;T1POST-LABEL: <test_B_8>:
241 define void @test_B_8() {
242 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
243 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
245 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
246 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
248 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
249 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
250 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
252 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
253 ;THUMB1: adds [[BASE]], #4
254 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
256 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
258 %a = alloca %struct.B, align 8
259 call void @use_B(ptr byval(%struct.B) align 8 %a)
262 ;ARM-LABEL: <test_B_16>:
263 ;THUMB2-LABEL: <test_B_16>:
264 ;NO_NEON-LABEL:<test_B_16>:
265 ;THUMB1-LABEL: <test_B_16>:
266 ;T1POST-LABEL: <test_B_16>:
267 define void @test_B_16() {
268 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
269 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
271 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
272 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
274 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
275 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
276 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
278 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
279 ;THUMB1: adds [[BASE]], #4
280 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
282 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
284 %a = alloca %struct.B, align 16
285 call void @use_B(ptr byval(%struct.B) align 16 %a)
288 ;ARM-LABEL: <test_C_1>:
289 ;THUMB2-LABEL: <test_C_1>:
290 ;NO_NEON-LABEL:<test_C_1>:
291 ;THUMB1-LABEL: <test_C_1>:
292 ;T1POST-LABEL: <test_C_1>:
293 define void @test_C_1() {
294 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
296 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
298 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
300 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
301 ;THUMB1: adds [[BASE]], #1
303 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
305 %a = alloca %struct.C, align 1
306 call void @use_C(ptr byval(%struct.C) align 1 %a)
309 ;ARM-LABEL: <test_C_2>:
310 ;THUMB2-LABEL: <test_C_2>:
311 ;NO_NEON-LABEL:<test_C_2>:
312 ;THUMB1-LABEL: <test_C_2>:
313 ;T1POST-LABEL: <test_C_2>:
314 define void @test_C_2() {
315 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
316 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
318 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
319 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
321 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
322 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
324 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
325 ;THUMB1: adds [[BASE]], #2
326 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
328 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
330 %a = alloca %struct.C, align 2
331 call void @use_C(ptr byval(%struct.C) align 2 %a)
334 ;ARM-LABEL: <test_C_4>:
335 ;THUMB2-LABEL: <test_C_4>:
336 ;NO_NEON-LABEL:<test_C_4>:
337 ;THUMB1-LABEL: <test_C_4>:
338 ;T1POST-LABEL: <test_C_4>:
339 define void @test_C_4() {
340 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
341 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
343 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
344 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
346 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
347 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
349 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
350 ;THUMB1: adds [[BASE]], #4
351 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
352 ;THUMB1: adds [[BASE]], #1
354 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
356 %a = alloca %struct.C, align 4
357 call void @use_C(ptr byval(%struct.C) align 4 %a)
360 ;ARM-LABEL: <test_C_8>:
361 ;THUMB2-LABEL: <test_C_8>:
362 ;NO_NEON-LABEL:<test_C_8>:
363 ;THUMB1-LABEL: <test_C_8>:
364 ;T1POST-LABEL: <test_C_8>:
365 define void @test_C_8() {
366 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
367 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
369 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
370 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
372 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
373 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
374 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
376 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
377 ;THUMB1: adds [[BASE]], #4
378 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
379 ;THUMB1: adds [[BASE]], #1
381 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
383 %a = alloca %struct.C, align 8
384 call void @use_C(ptr byval(%struct.C) align 8 %a)
387 ;ARM-LABEL: <test_C_16>:
388 ;THUMB2-LABEL: <test_C_16>:
389 ;NO_NEON-LABEL:<test_C_16>:
390 ;THUMB1-LABEL: <test_C_16>:
391 ;T1POST-LABEL: <test_C_16>:
392 define void @test_C_16() {
393 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
394 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
396 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
397 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
399 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
400 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
401 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
403 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
404 ;THUMB1: adds [[BASE]], #4
405 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
406 ;THUMB1: adds [[BASE]], #1
408 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
410 %a = alloca %struct.C, align 16
411 call void @use_C(ptr byval(%struct.C) align 16 %a)
414 ;ARM-LABEL: <test_D_1>:
415 ;THUMB2-LABEL: <test_D_1>:
416 ;NO_NEON-LABEL:<test_D_1>:
417 ;THUMB1-LABEL: <test_D_1>:
418 ;T1POST-LABEL: <test_D_1>:
419 define void @test_D_1() {
420 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
423 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
426 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
429 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
430 ;THUMB1: adds [[BASE]], #1
433 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
435 %a = alloca %struct.D, align 1
436 call void @use_D(ptr byval(%struct.D) align 1 %a)
439 ;ARM-LABEL: <test_D_2>:
440 ;THUMB2-LABEL: <test_D_2>:
441 ;NO_NEON-LABEL:<test_D_2>:
442 ;THUMB1-LABEL: <test_D_2>:
443 ;T1POST-LABEL: <test_D_2>:
444 define void @test_D_2() {
445 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
448 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
451 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
454 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
455 ;THUMB1: adds [[BASE]], #2
458 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
460 %a = alloca %struct.D, align 2
461 call void @use_D(ptr byval(%struct.D) align 2 %a)
464 ;ARM-LABEL: <test_D_4>:
465 ;THUMB2-LABEL: <test_D_4>:
466 ;NO_NEON-LABEL:<test_D_4>:
467 ;THUMB1-LABEL: <test_D_4>:
468 ;T1POST-LABEL: <test_D_4>:
469 define void @test_D_4() {
470 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
473 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
476 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
479 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
480 ;THUMB1: adds [[BASE]], #4
483 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
485 %a = alloca %struct.D, align 4
486 call void @use_D(ptr byval(%struct.D) align 4 %a)
489 ;ARM-LABEL: <test_D_8>:
490 ;THUMB2-LABEL: <test_D_8>:
491 ;NO_NEON-LABEL:<test_D_8>:
492 ;THUMB1-LABEL: <test_D_8>:
493 ;T1POST-LABEL: <test_D_8>:
494 define void @test_D_8() {
495 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
498 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
501 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
503 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
505 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
506 ;THUMB1: adds [[BASE]], #4
509 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
511 %a = alloca %struct.D, align 8
512 call void @use_D(ptr byval(%struct.D) align 8 %a)
515 ;ARM-LABEL: <test_D_16>:
516 ;THUMB2-LABEL: <test_D_16>:
517 ;NO_NEON-LABEL:<test_D_16>:
518 ;THUMB1-LABEL: <test_D_16>:
519 ;T1POST-LABEL: <test_D_16>:
520 define void @test_D_16() {
521 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
524 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
527 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
529 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
531 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
532 ;THUMB1: adds [[BASE]], #4
535 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
537 %a = alloca %struct.D, align 16
538 call void @use_D(ptr byval(%struct.D) align 16 %a)
541 ;ARM-LABEL: <test_E_1>:
542 ;THUMB2-LABEL: <test_E_1>:
543 ;NO_NEON-LABEL:<test_E_1>:
544 ;THUMB1-LABEL: <test_E_1>:
545 ;T1POST-LABEL: <test_E_1>:
546 define void @test_E_1() {
547 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
550 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
553 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
556 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
557 ;THUMB1: adds [[BASE]], #1
560 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
562 %a = alloca %struct.E, align 1
563 call void @use_E(ptr byval(%struct.E) align 1 %a)
566 ;ARM-LABEL: <test_E_2>:
567 ;THUMB2-LABEL: <test_E_2>:
568 ;NO_NEON-LABEL:<test_E_2>:
569 ;THUMB1-LABEL: <test_E_2>:
570 ;T1POST-LABEL: <test_E_2>:
571 define void @test_E_2() {
572 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
574 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
576 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
578 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
580 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
582 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
584 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
585 ;THUMB1: adds [[BASE]], #2
587 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
589 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
591 %a = alloca %struct.E, align 2
592 call void @use_E(ptr byval(%struct.E) align 2 %a)
595 ;ARM-LABEL: <test_E_4>:
596 ;THUMB2-LABEL: <test_E_4>:
597 ;NO_NEON-LABEL:<test_E_4>:
598 ;THUMB1-LABEL: <test_E_4>:
599 ;T1POST-LABEL: <test_E_4>:
600 define void @test_E_4() {
601 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
603 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
605 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
607 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
609 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
611 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
613 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
614 ;THUMB1: adds [[BASE]], #4
616 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
618 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
620 %a = alloca %struct.E, align 4
621 call void @use_E(ptr byval(%struct.E) align 4 %a)
624 ;ARM-LABEL: <test_E_8>:
625 ;THUMB2-LABEL: <test_E_8>:
626 ;NO_NEON-LABEL:<test_E_8>:
627 ;THUMB1-LABEL: <test_E_8>:
628 ;T1POST-LABEL: <test_E_8>:
629 define void @test_E_8() {
630 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
632 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
634 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
636 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
638 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
640 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
641 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
643 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
644 ;THUMB1: adds [[BASE]], #4
646 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
648 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
650 %a = alloca %struct.E, align 8
651 call void @use_E(ptr byval(%struct.E) align 8 %a)
654 ;ARM-LABEL: <test_E_16>:
655 ;THUMB2-LABEL: <test_E_16>:
656 ;NO_NEON-LABEL:<test_E_16>:
657 ;THUMB1-LABEL: <test_E_16>:
658 ;T1POST-LABEL: <test_E_16>:
659 define void @test_E_16() {
660 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
662 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
664 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
666 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
668 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
670 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
671 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
673 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
674 ;THUMB1: adds [[BASE]], #4
676 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
678 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
680 %a = alloca %struct.E, align 16
681 call void @use_E(ptr byval(%struct.E) align 16 %a)
684 ;ARM-LABEL: <test_F_1>:
685 ;THUMB2-LABEL: <test_F_1>:
686 ;NO_NEON-LABEL:<test_F_1>:
687 ;THUMB1-LABEL: <test_F_1>:
688 ;T1POST-LABEL: <test_F_1>:
689 define void @test_F_1() {
690 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
693 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
696 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
699 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
700 ;THUMB1: adds [[BASE]], #1
703 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
705 %a = alloca %struct.F, align 1
706 call void @use_F(ptr byval(%struct.F) align 1 %a)
709 ;ARM-LABEL: <test_F_2>:
710 ;THUMB2-LABEL: <test_F_2>:
711 ;NO_NEON-LABEL:<test_F_2>:
712 ;THUMB1-LABEL: <test_F_2>:
713 ;T1POST-LABEL: <test_F_2>:
714 define void @test_F_2() {
715 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
717 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
719 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
721 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
723 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
725 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
727 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
728 ;THUMB1: adds [[BASE]], #2
730 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
732 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
734 %a = alloca %struct.F, align 2
735 call void @use_F(ptr byval(%struct.F) align 2 %a)
738 ;ARM-LABEL: <test_F_4>:
739 ;THUMB2-LABEL: <test_F_4>:
740 ;NO_NEON-LABEL:<test_F_4>:
741 ;THUMB1-LABEL: <test_F_4>:
742 ;T1POST-LABEL: <test_F_4>:
743 define void @test_F_4() {
744 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
746 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
748 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
750 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
752 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
754 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
756 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
757 ;THUMB1: adds [[BASE]], #4
759 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
760 ;THUMB1: adds [[BASE]], #1
762 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
764 %a = alloca %struct.F, align 4
765 call void @use_F(ptr byval(%struct.F) align 4 %a)
768 ;ARM-LABEL: <test_F_8>:
769 ;THUMB2-LABEL: <test_F_8>:
770 ;NO_NEON-LABEL:<test_F_8>:
771 ;THUMB1-LABEL: <test_F_8>:
772 ;T1POST-LABEL: <test_F_8>:
773 define void @test_F_8() {
774 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
776 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
778 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
780 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
782 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
784 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
785 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
787 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
788 ;THUMB1: adds [[BASE]], #4
790 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
791 ;THUMB1: adds [[BASE]], #1
793 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
795 %a = alloca %struct.F, align 8
796 call void @use_F(ptr byval(%struct.F) align 8 %a)
799 ;ARM-LABEL: <test_F_16>:
800 ;THUMB2-LABEL: <test_F_16>:
801 ;NO_NEON-LABEL:<test_F_16>:
802 ;THUMB1-LABEL: <test_F_16>:
803 ;T1POST-LABEL: <test_F_16>:
804 define void @test_F_16() {
805 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
807 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
809 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
811 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
813 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
815 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
816 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
818 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
819 ;THUMB1: adds [[BASE]], #4
821 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
822 ;THUMB1: adds [[BASE]], #1
824 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
826 %a = alloca %struct.F, align 16
827 call void @use_F(ptr byval(%struct.F) align 16 %a)
830 ;ARM-LABEL: <test_G_1>:
831 ;THUMB2-LABEL: <test_G_1>:
832 ;NO_NEON-LABEL:<test_G_1>:
833 ;THUMB1-LABEL: <test_G_1>:
834 ;T1POST-LABEL: <test_G_1>:
835 define void @test_G_1() {
836 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
838 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
840 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
842 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
843 ;THUMB1: adds [[BASE]], #1
845 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
847 %a = alloca %struct.G, align 1
848 call void @use_G(ptr byval(%struct.G) align 1 %a)
851 ;ARM-LABEL: <test_G_2>:
852 ;THUMB2-LABEL: <test_G_2>:
853 ;NO_NEON-LABEL:<test_G_2>:
854 ;THUMB1-LABEL: <test_G_2>:
855 ;T1POST-LABEL: <test_G_2>:
856 define void @test_G_2() {
857 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
859 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
861 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
863 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
864 ;THUMB1: adds [[BASE]], #2
866 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
868 %a = alloca %struct.G, align 2
869 call void @use_G(ptr byval(%struct.G) align 2 %a)
872 ;ARM-LABEL: <test_G_4>:
873 ;THUMB2-LABEL: <test_G_4>:
874 ;NO_NEON-LABEL:<test_G_4>:
875 ;THUMB1-LABEL: <test_G_4>:
876 ;T1POST-LABEL: <test_G_4>:
877 define void @test_G_4() {
878 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
880 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
882 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
884 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
885 ;THUMB1: adds [[BASE]], #4
887 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
889 %a = alloca %struct.G, align 4
890 call void @use_G(ptr byval(%struct.G) align 4 %a)
893 ;ARM-LABEL: <test_G_8>:
894 ;THUMB2-LABEL: <test_G_8>:
895 ;NO_NEON-LABEL:<test_G_8>:
896 ;THUMB1-LABEL: <test_G_8>:
897 ;T1POST-LABEL: <test_G_8>:
898 define void @test_G_8() {
899 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
901 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
903 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
904 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
906 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
907 ;THUMB1: adds [[BASE]], #4
909 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
911 %a = alloca %struct.G, align 8
912 call void @use_G(ptr byval(%struct.G) align 8 %a)
915 ;ARM-LABEL: <test_G_16>:
916 ;THUMB2-LABEL: <test_G_16>:
917 ;NO_NEON-LABEL:<test_G_16>:
918 ;THUMB1-LABEL: <test_G_16>:
919 ;T1POST-LABEL: <test_G_16>:
920 define void @test_G_16() {
921 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
923 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
925 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
926 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
928 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
929 ;THUMB1: adds [[BASE]], #4
931 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
933 %a = alloca %struct.G, align 16
934 call void @use_G(ptr byval(%struct.G) align 16 %a)
937 ;ARM-LABEL: <test_H_1>:
938 ;THUMB2-LABEL: <test_H_1>:
939 ;NO_NEON-LABEL:<test_H_1>:
940 ;THUMB1-LABEL: <test_H_1>:
941 ;T1POST-LABEL: <test_H_1>:
942 define void @test_H_1() {
943 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
945 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
947 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
949 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
950 ;THUMB1: adds [[BASE]], #1
952 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
954 %a = alloca %struct.H, align 1
955 call void @use_H(ptr byval(%struct.H) align 1 %a)
958 ;ARM-LABEL: <test_H_2>:
959 ;THUMB2-LABEL: <test_H_2>:
960 ;NO_NEON-LABEL:<test_H_2>:
961 ;THUMB1-LABEL: <test_H_2>:
962 ;T1POST-LABEL: <test_H_2>:
963 define void @test_H_2() {
964 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
966 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
968 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
970 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
971 ;THUMB1: adds [[BASE]], #2
973 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
975 %a = alloca %struct.H, align 2
976 call void @use_H(ptr byval(%struct.H) align 2 %a)
979 ;ARM-LABEL: <test_H_4>:
980 ;THUMB2-LABEL: <test_H_4>:
981 ;NO_NEON-LABEL:<test_H_4>:
982 ;THUMB1-LABEL: <test_H_4>:
983 ;T1POST-LABEL: <test_H_4>:
984 define void @test_H_4() {
985 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
987 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
989 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
991 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
992 ;THUMB1: adds [[BASE]], #4
994 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
996 %a = alloca %struct.H, align 4
997 call void @use_H(ptr byval(%struct.H) align 4 %a)
1000 ;ARM-LABEL: <test_H_8>:
1001 ;THUMB2-LABEL: <test_H_8>:
1002 ;NO_NEON-LABEL:<test_H_8>:
1003 ;THUMB1-LABEL: <test_H_8>:
1004 ;T1POST-LABEL: <test_H_8>:
1005 define void @test_H_8() {
1006 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1008 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1010 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1011 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1013 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1014 ;THUMB1: adds [[BASE]], #4
1016 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1018 %a = alloca %struct.H, align 8
1019 call void @use_H(ptr byval(%struct.H) align 8 %a)
1022 ;ARM-LABEL: <test_H_16>:
1023 ;THUMB2-LABEL: <test_H_16>:
1024 ;NO_NEON-LABEL:<test_H_16>:
1025 ;THUMB1-LABEL: <test_H_16>:
1026 ;T1POST-LABEL: <test_H_16>:
1027 define void @test_H_16() {
1028 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1030 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1032 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1033 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1035 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1036 ;THUMB1: adds [[BASE]], #4
1038 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1040 %a = alloca %struct.H, align 16
1041 call void @use_H(ptr byval(%struct.H) align 16 %a)
1044 ;ARM-LABEL: <test_I_1>:
1045 ;THUMB2-LABEL: <test_I_1>:
1046 ;NO_NEON-LABEL:<test_I_1>:
1047 ;THUMB1-LABEL: <test_I_1>:
1048 ;T1POST-LABEL: <test_I_1>:
1049 define void @test_I_1() {
1050 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
1052 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
1054 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
1056 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1057 ;THUMB1: adds [[BASE]], #1
1059 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
1061 %a = alloca %struct.I, align 1
1062 call void @use_I(ptr byval(%struct.I) align 1 %a)
1065 ;ARM-LABEL: <test_I_2>:
1066 ;THUMB2-LABEL: <test_I_2>:
1067 ;NO_NEON-LABEL:<test_I_2>:
1068 ;THUMB1-LABEL: <test_I_2>:
1069 ;T1POST-LABEL: <test_I_2>:
1070 define void @test_I_2() {
1071 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
1073 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
1075 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
1077 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1078 ;THUMB1: adds [[BASE]], #2
1080 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
1082 %a = alloca %struct.I, align 2
1083 call void @use_I(ptr byval(%struct.I) align 2 %a)
1086 ;ARM-LABEL: <test_I_4>:
1087 ;THUMB2-LABEL: <test_I_4>:
1088 ;NO_NEON-LABEL:<test_I_4>:
1089 ;THUMB1-LABEL: <test_I_4>:
1090 ;T1POST-LABEL: <test_I_4>:
1091 define void @test_I_4() {
1092 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
1094 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
1096 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1098 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1099 ;THUMB1: adds [[BASE]], #4
1101 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
1103 %a = alloca %struct.I, align 4
1104 call void @use_I(ptr byval(%struct.I) align 4 %a)
1107 ;ARM-LABEL: <test_I_8>:
1108 ;THUMB2-LABEL: <test_I_8>:
1109 ;NO_NEON-LABEL:<test_I_8>:
1110 ;THUMB1-LABEL: <test_I_8>:
1111 ;T1POST-LABEL: <test_I_8>:
1112 define void @test_I_8() {
1113 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1115 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1117 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1118 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1120 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1121 ;THUMB1: adds [[BASE]], #4
1123 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1125 %a = alloca %struct.I, align 8
1126 call void @use_I(ptr byval(%struct.I) align 8 %a)
1129 ;ARM-LABEL: <test_I_16>:
1130 ;THUMB2-LABEL: <test_I_16>:
1131 ;NO_NEON-LABEL:<test_I_16>:
1132 ;THUMB1-LABEL: <test_I_16>:
1133 ;T1POST-LABEL: <test_I_16>:
1134 define void @test_I_16() {
1135 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1137 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1139 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1140 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1142 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1143 ;THUMB1: adds [[BASE]], #4
1145 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1147 %a = alloca %struct.I, align 16
1148 call void @use_I(ptr byval(%struct.I) align 16 %a)
1151 ;ARM-LABEL: <test_J_1>:
1152 ;THUMB2-LABEL: <test_J_1>:
1153 ;NO_NEON-LABEL:<test_J_1>:
1154 ;THUMB1-LABEL: <test_J_1>:
1155 ;T1POST-LABEL: <test_J_1>:
1156 define void @test_J_1() {
1157 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
1160 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
1163 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
1166 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1167 ;THUMB1: adds [[BASE]], #1
1170 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
1172 %a = alloca %struct.J, align 1
1173 call void @use_J(ptr byval(%struct.J) align 1 %a)
1176 ;ARM-LABEL: <test_J_2>:
1177 ;THUMB2-LABEL: <test_J_2>:
1178 ;NO_NEON-LABEL:<test_J_2>:
1179 ;THUMB1-LABEL: <test_J_2>:
1180 ;T1POST-LABEL: <test_J_2>:
1181 define void @test_J_2() {
1182 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
1185 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
1188 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
1191 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1192 ;THUMB1: adds [[BASE]], #2
1195 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
1197 %a = alloca %struct.J, align 2
1198 call void @use_J(ptr byval(%struct.J) align 2 %a)
1201 ;ARM-LABEL: <test_J_4>:
1202 ;THUMB2-LABEL: <test_J_4>:
1203 ;NO_NEON-LABEL:<test_J_4>:
1204 ;THUMB1-LABEL: <test_J_4>:
1205 ;T1POST-LABEL: <test_J_4>:
1206 define void @test_J_4() {
1207 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
1210 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
1213 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1216 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1217 ;THUMB1: adds [[BASE]], #4
1220 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
1222 %a = alloca %struct.J, align 4
1223 call void @use_J(ptr byval(%struct.J) align 4 %a)
1226 ;ARM-LABEL: <test_J_8>:
1227 ;THUMB2-LABEL: <test_J_8>:
1228 ;NO_NEON-LABEL:<test_J_8>:
1229 ;THUMB1-LABEL: <test_J_8>:
1230 ;T1POST-LABEL: <test_J_8>:
1231 define void @test_J_8() {
1232 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1235 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1238 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1240 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1242 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1243 ;THUMB1: adds [[BASE]], #4
1246 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1248 %a = alloca %struct.J, align 8
1249 call void @use_J(ptr byval(%struct.J) align 8 %a)
1252 ;ARM-LABEL: <test_J_16>:
1253 ;THUMB2-LABEL: <test_J_16>:
1254 ;NO_NEON-LABEL:<test_J_16>:
1255 ;THUMB1-LABEL: <test_J_16>:
1256 ;T1POST-LABEL: <test_J_16>:
1257 define void @test_J_16() {
1258 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1261 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1264 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1266 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1268 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1269 ;THUMB1: adds [[BASE]], #4
1272 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1274 %a = alloca %struct.J, align 16
1275 call void @use_J(ptr byval(%struct.J) align 16 %a)
1278 ;ARM-LABEL: <test_K_1>:
1279 ;THUMB2-LABEL: <test_K_1>:
1280 ;NO_NEON-LABEL:<test_K_1>:
1281 ;THUMB1-LABEL: <test_K_1>:
1282 ;T1POST-LABEL: <test_K_1>:
1283 define void @test_K_1() {
1284 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
1287 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
1290 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
1293 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1294 ;THUMB1: adds [[BASE]], #1
1297 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
1299 %a = alloca %struct.K, align 1
1300 call void @use_K(ptr byval(%struct.K) align 1 %a)
1303 ;ARM-LABEL: <test_K_2>:
1304 ;THUMB2-LABEL: <test_K_2>:
1305 ;NO_NEON-LABEL:<test_K_2>:
1306 ;THUMB1-LABEL: <test_K_2>:
1307 ;T1POST-LABEL: <test_K_2>:
1308 define void @test_K_2() {
1309 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
1312 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
1315 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
1318 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1319 ;THUMB1: adds [[BASE]], #2
1322 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
1324 %a = alloca %struct.K, align 2
1325 call void @use_K(ptr byval(%struct.K) align 2 %a)
1328 ;ARM-LABEL: <test_K_4>:
1329 ;THUMB2-LABEL: <test_K_4>:
1330 ;NO_NEON-LABEL:<test_K_4>:
1331 ;THUMB1-LABEL: <test_K_4>:
1332 ;T1POST-LABEL: <test_K_4>:
1333 define void @test_K_4() {
1334 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
1337 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
1340 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1343 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1344 ;THUMB1: adds [[BASE]], #4
1347 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
1349 %a = alloca %struct.K, align 4
1350 call void @use_K(ptr byval(%struct.K) align 4 %a)
1353 ;ARM-LABEL: <test_K_8>:
1354 ;THUMB2-LABEL: <test_K_8>:
1355 ;NO_NEON-LABEL:<test_K_8>:
1356 ;THUMB1-LABEL: <test_K_8>:
1357 ;T1POST-LABEL: <test_K_8>:
1358 define void @test_K_8() {
1359 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1362 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1365 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1367 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1369 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1370 ;THUMB1: adds [[BASE]], #4
1373 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1375 %a = alloca %struct.K, align 8
1376 call void @use_K(ptr byval(%struct.K) align 8 %a)
1379 ;ARM-LABEL: <test_K_16>:
1380 ;THUMB2-LABEL: <test_K_16>:
1381 ;NO_NEON-LABEL:<test_K_16>:
1382 ;THUMB1-LABEL: <test_K_16>:
1383 ;T1POST-LABEL: <test_K_16>:
1384 define void @test_K_16() {
1385 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1388 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1391 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1393 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1395 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1396 ;THUMB1: adds [[BASE]], #4
1399 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1401 %a = alloca %struct.K, align 16
1402 call void @use_K(ptr byval(%struct.K) align 16 %a)
1405 ;ARM-LABEL: <test_L_1>:
1406 ;THUMB2-LABEL: <test_L_1>:
1407 ;NO_NEON-LABEL:<test_L_1>:
1408 ;THUMB1-LABEL: <test_L_1>:
1409 ;T1POST-LABEL: <test_L_1>:
1410 define void @test_L_1() {
1411 ;ARM: ldrb r{{[0-9]+}}, [{{.*}}], #1
1414 ;THUMB2: ldrb r{{[0-9]+}}, [{{.*}}], #1
1417 ;NO_NEON: ldrb r{{[0-9]+}}, [{{.*}}], #1
1420 ;THUMB1: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1421 ;THUMB1: adds [[BASE]], #1
1424 ;T1POST-NOT: ldrb r{{[0-9]+}}, [{{.*}}], #1
1426 %a = alloca %struct.L, align 1
1427 call void @use_L(ptr byval(%struct.L) align 1 %a)
1430 ;ARM-LABEL: <test_L_2>:
1431 ;THUMB2-LABEL: <test_L_2>:
1432 ;NO_NEON-LABEL:<test_L_2>:
1433 ;THUMB1-LABEL: <test_L_2>:
1434 ;T1POST-LABEL: <test_L_2>:
1435 define void @test_L_2() {
1436 ;ARM: ldrh r{{[0-9]+}}, [{{.*}}], #2
1439 ;THUMB2: ldrh r{{[0-9]+}}, [{{.*}}], #2
1442 ;NO_NEON: ldrh r{{[0-9]+}}, [{{.*}}], #2
1445 ;THUMB1: ldrh r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1446 ;THUMB1: adds [[BASE]], #2
1449 ;T1POST-NOT: ldrh r{{[0-9]+}}, [{{.*}}], #2
1451 %a = alloca %struct.L, align 2
1452 call void @use_L(ptr byval(%struct.L) align 2 %a)
1455 ;ARM-LABEL: <test_L_4>:
1456 ;THUMB2-LABEL: <test_L_4>:
1457 ;NO_NEON-LABEL:<test_L_4>:
1458 ;THUMB1-LABEL: <test_L_4>:
1459 ;T1POST-LABEL: <test_L_4>:
1460 define void @test_L_4() {
1461 ;ARM: ldr r{{[0-9]+}}, [{{.*}}], #4
1464 ;THUMB2: ldr r{{[0-9]+}}, [{{.*}}], #4
1467 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1470 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1471 ;THUMB1: adds [[BASE]], #4
1474 ;T1POST-NOT: ldr r{{[0-9]+}}, [{{.*}}], #4
1476 %a = alloca %struct.L, align 4
1477 call void @use_L(ptr byval(%struct.L) align 4 %a)
1480 ;ARM-LABEL: <test_L_8>:
1481 ;THUMB2-LABEL: <test_L_8>:
1482 ;NO_NEON-LABEL:<test_L_8>:
1483 ;THUMB1-LABEL: <test_L_8>:
1484 ;T1POST-LABEL: <test_L_8>:
1485 define void @test_L_8() {
1486 ;ARM: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1489 ;THUMB2: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1492 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1494 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1496 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1497 ;THUMB1: adds [[BASE]], #4
1500 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}}, [{{.*}}]!
1502 %a = alloca %struct.L, align 8
1503 call void @use_L(ptr byval(%struct.L) align 8 %a)
1506 ;ARM-LABEL: <test_L_16>:
1507 ;THUMB2-LABEL: <test_L_16>:
1508 ;NO_NEON-LABEL:<test_L_16>:
1509 ;THUMB1-LABEL: <test_L_16>:
1510 ;T1POST-LABEL: <test_L_16>:
1511 define void @test_L_16() {
1512 ;ARM: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1515 ;THUMB2: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1518 ;NO_NEON: ldr r{{[0-9]+}}, [{{.*}}], #4
1520 ;NO_NEON-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1522 ;THUMB1: ldr r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1523 ;THUMB1: adds [[BASE]], #4
1526 ;T1POST-NOT: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [{{.*}}]!
1528 %a = alloca %struct.L, align 16
1529 call void @use_L(ptr byval(%struct.L) align 16 %a)
1532 ;V8MBASE-LABEL: <test_M>:
1533 define void @test_M() {
1535 ;V8MBASE: ldrb r{{[0-9]+}}, [[[BASE:r[0-9]+]]]
1536 ;V8MBASE: adds [[BASE]], #1
1539 %a = alloca %struct.M, align 1
1540 call void @use_M(ptr byval(%struct.M) align 1 %a)
1543 ;V8MBASE-LABEL: <test_N>:
1544 define void @test_N() {
1546 ;V8MBASE: movw r{{[0-9]+}}, #{{[0-9]+}}
1547 ;V8MBASE-NOT: b #{{[0-9]+}}
1549 %a = alloca %struct.N, align 1
1550 call void @use_N(ptr byval(%struct.N) align 1 %a)