1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs --mtriple powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P8LE
4 ; RUN: llc -verify-machineinstrs --mtriple powerpc64le-unknown-linux-gnu \
5 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P9LE
6 ; RUN: llc -verify-machineinstrs --mtriple powerpc64le-unknown-linux-gnu \
7 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P10LE
8 ; RUN: llc -verify-machineinstrs --mtriple powerpc64-unknown-linux-gnu \
9 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P8BE
10 ; RUN: llc -verify-machineinstrs --mtriple powerpc64-unknown-linux-gnu \
11 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P9BE
12 ; RUN: llc -verify-machineinstrs --mtriple powerpc64-unknown-linux-gnu \
13 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P10BE
15 define signext i8 @caller_1(ptr nocapture readonly byval([1 x i8]) %data) #0 {
16 ; P8LE-LABEL: caller_1:
17 ; P8LE: # %bb.0: # %entry
19 ; P8LE-NEXT: stdu r1, -64(r1)
20 ; P8LE-NEXT: std r0, 80(r1)
21 ; P8LE-NEXT: stb r3, 48(r1)
22 ; P8LE-NEXT: lbz r3, 48(r1)
23 ; P8LE-NEXT: stb r3, 63(r1)
24 ; P8LE-NEXT: addi r3, r1, 63
25 ; P8LE-NEXT: bl callee
28 ; P8LE-NEXT: addi r1, r1, 64
29 ; P8LE-NEXT: ld r0, 16(r1)
33 ; P9LE-LABEL: caller_1:
34 ; P9LE: # %bb.0: # %entry
36 ; P9LE-NEXT: stdu r1, -64(r1)
37 ; P9LE-NEXT: std r0, 80(r1)
38 ; P9LE-NEXT: stb r3, 48(r1)
39 ; P9LE-NEXT: lbz r3, 48(r1)
40 ; P9LE-NEXT: stb r3, 63(r1)
41 ; P9LE-NEXT: addi r3, r1, 63
42 ; P9LE-NEXT: bl callee
45 ; P9LE-NEXT: addi r1, r1, 64
46 ; P9LE-NEXT: ld r0, 16(r1)
50 ; P10LE-LABEL: caller_1:
51 ; P10LE: # %bb.0: # %entry
53 ; P10LE-NEXT: std r0, 16(r1)
54 ; P10LE-NEXT: stdu r1, -64(r1)
55 ; P10LE-NEXT: stb r3, 48(r1)
56 ; P10LE-NEXT: lbz r3, 48(r1)
57 ; P10LE-NEXT: stb r3, 63(r1)
58 ; P10LE-NEXT: addi r3, r1, 63
59 ; P10LE-NEXT: bl callee@notoc
60 ; P10LE-NEXT: li r3, 0
61 ; P10LE-NEXT: addi r1, r1, 64
62 ; P10LE-NEXT: ld r0, 16(r1)
66 ; P8BE-LABEL: caller_1:
67 ; P8BE: # %bb.0: # %entry
69 ; P8BE-NEXT: stdu r1, -128(r1)
70 ; P8BE-NEXT: std r0, 144(r1)
71 ; P8BE-NEXT: stb r3, 183(r1)
72 ; P8BE-NEXT: lbz r3, 183(r1)
73 ; P8BE-NEXT: stb r3, 127(r1)
74 ; P8BE-NEXT: addi r3, r1, 127
75 ; P8BE-NEXT: bl callee
78 ; P8BE-NEXT: addi r1, r1, 128
79 ; P8BE-NEXT: ld r0, 16(r1)
83 ; P9BE-LABEL: caller_1:
84 ; P9BE: # %bb.0: # %entry
86 ; P9BE-NEXT: stdu r1, -128(r1)
87 ; P9BE-NEXT: std r0, 144(r1)
88 ; P9BE-NEXT: stb r3, 183(r1)
89 ; P9BE-NEXT: lbz r3, 183(r1)
90 ; P9BE-NEXT: stb r3, 127(r1)
91 ; P9BE-NEXT: addi r3, r1, 127
92 ; P9BE-NEXT: bl callee
95 ; P9BE-NEXT: addi r1, r1, 128
96 ; P9BE-NEXT: ld r0, 16(r1)
100 ; P10BE-LABEL: caller_1:
101 ; P10BE: # %bb.0: # %entry
102 ; P10BE-NEXT: mflr r0
103 ; P10BE-NEXT: std r0, 16(r1)
104 ; P10BE-NEXT: stdu r1, -128(r1)
105 ; P10BE-NEXT: stb r3, 183(r1)
106 ; P10BE-NEXT: lbz r3, 183(r1)
107 ; P10BE-NEXT: stb r3, 127(r1)
108 ; P10BE-NEXT: addi r3, r1, 127
109 ; P10BE-NEXT: bl callee
111 ; P10BE-NEXT: li r3, 0
112 ; P10BE-NEXT: addi r1, r1, 128
113 ; P10BE-NEXT: ld r0, 16(r1)
114 ; P10BE-NEXT: mtlr r0
117 %_param_data = alloca [1 x i8], align 1
118 %.unpack = load i8, ptr %data, align 1
119 store i8 %.unpack, ptr %_param_data, align 1
120 call void @callee(ptr nonnull %_param_data)
124 define signext i8 @caller_2(ptr nocapture readonly byval([2 x i8]) %data) #0 {
125 ; P8LE-LABEL: caller_2:
126 ; P8LE: # %bb.0: # %entry
128 ; P8LE-NEXT: stdu r1, -64(r1)
129 ; P8LE-NEXT: std r0, 80(r1)
130 ; P8LE-NEXT: sth r3, 48(r1)
131 ; P8LE-NEXT: lhz r3, 48(r1)
132 ; P8LE-NEXT: sth r3, 62(r1)
133 ; P8LE-NEXT: addi r3, r1, 62
134 ; P8LE-NEXT: bl callee
136 ; P8LE-NEXT: li r3, 0
137 ; P8LE-NEXT: addi r1, r1, 64
138 ; P8LE-NEXT: ld r0, 16(r1)
142 ; P9LE-LABEL: caller_2:
143 ; P9LE: # %bb.0: # %entry
145 ; P9LE-NEXT: stdu r1, -64(r1)
146 ; P9LE-NEXT: std r0, 80(r1)
147 ; P9LE-NEXT: sth r3, 48(r1)
148 ; P9LE-NEXT: lhz r3, 48(r1)
149 ; P9LE-NEXT: sth r3, 62(r1)
150 ; P9LE-NEXT: addi r3, r1, 62
151 ; P9LE-NEXT: bl callee
153 ; P9LE-NEXT: li r3, 0
154 ; P9LE-NEXT: addi r1, r1, 64
155 ; P9LE-NEXT: ld r0, 16(r1)
159 ; P10LE-LABEL: caller_2:
160 ; P10LE: # %bb.0: # %entry
161 ; P10LE-NEXT: mflr r0
162 ; P10LE-NEXT: std r0, 16(r1)
163 ; P10LE-NEXT: stdu r1, -64(r1)
164 ; P10LE-NEXT: sth r3, 48(r1)
165 ; P10LE-NEXT: lhz r3, 48(r1)
166 ; P10LE-NEXT: sth r3, 62(r1)
167 ; P10LE-NEXT: addi r3, r1, 62
168 ; P10LE-NEXT: bl callee@notoc
169 ; P10LE-NEXT: li r3, 0
170 ; P10LE-NEXT: addi r1, r1, 64
171 ; P10LE-NEXT: ld r0, 16(r1)
172 ; P10LE-NEXT: mtlr r0
175 ; P8BE-LABEL: caller_2:
176 ; P8BE: # %bb.0: # %entry
178 ; P8BE-NEXT: stdu r1, -128(r1)
179 ; P8BE-NEXT: std r0, 144(r1)
180 ; P8BE-NEXT: sth r3, 182(r1)
181 ; P8BE-NEXT: lhz r3, 182(r1)
182 ; P8BE-NEXT: sth r3, 126(r1)
183 ; P8BE-NEXT: addi r3, r1, 126
184 ; P8BE-NEXT: bl callee
186 ; P8BE-NEXT: li r3, 0
187 ; P8BE-NEXT: addi r1, r1, 128
188 ; P8BE-NEXT: ld r0, 16(r1)
192 ; P9BE-LABEL: caller_2:
193 ; P9BE: # %bb.0: # %entry
195 ; P9BE-NEXT: stdu r1, -128(r1)
196 ; P9BE-NEXT: std r0, 144(r1)
197 ; P9BE-NEXT: sth r3, 182(r1)
198 ; P9BE-NEXT: lhz r3, 182(r1)
199 ; P9BE-NEXT: sth r3, 126(r1)
200 ; P9BE-NEXT: addi r3, r1, 126
201 ; P9BE-NEXT: bl callee
203 ; P9BE-NEXT: li r3, 0
204 ; P9BE-NEXT: addi r1, r1, 128
205 ; P9BE-NEXT: ld r0, 16(r1)
209 ; P10BE-LABEL: caller_2:
210 ; P10BE: # %bb.0: # %entry
211 ; P10BE-NEXT: mflr r0
212 ; P10BE-NEXT: std r0, 16(r1)
213 ; P10BE-NEXT: stdu r1, -128(r1)
214 ; P10BE-NEXT: sth r3, 182(r1)
215 ; P10BE-NEXT: lhz r3, 182(r1)
216 ; P10BE-NEXT: sth r3, 126(r1)
217 ; P10BE-NEXT: addi r3, r1, 126
218 ; P10BE-NEXT: bl callee
220 ; P10BE-NEXT: li r3, 0
221 ; P10BE-NEXT: addi r1, r1, 128
222 ; P10BE-NEXT: ld r0, 16(r1)
223 ; P10BE-NEXT: mtlr r0
226 %_param_data = alloca [2 x i8], align 1
227 %.unpack = load i8, ptr %data, align 1
228 %.elt1 = getelementptr inbounds [2 x i8], ptr %data, i64 0, i64 1
229 %.unpack2 = load i8, ptr %.elt1, align 1
230 store i8 %.unpack, ptr %_param_data, align 1
231 %.temp.1.gep = getelementptr inbounds [2 x i8], ptr %_param_data, i64 0, i64 1
232 store i8 %.unpack2, ptr %.temp.1.gep, align 1
233 call void @callee(ptr nonnull %_param_data)
237 define signext i8 @caller_3(ptr nocapture readonly byval([3 x i8]) %data) #0 {
238 ; P8LE-LABEL: caller_3:
239 ; P8LE: # %bb.0: # %entry
241 ; P8LE-NEXT: stdu r1, -64(r1)
242 ; P8LE-NEXT: std r0, 80(r1)
243 ; P8LE-NEXT: sth r3, 48(r1)
244 ; P8LE-NEXT: rldicl r3, r3, 48, 16
245 ; P8LE-NEXT: stb r3, 50(r1)
246 ; P8LE-NEXT: lhz r3, 48(r1)
247 ; P8LE-NEXT: lbz r4, 50(r1)
248 ; P8LE-NEXT: sth r3, 61(r1)
249 ; P8LE-NEXT: addi r3, r1, 61
250 ; P8LE-NEXT: stb r4, 63(r1)
251 ; P8LE-NEXT: bl callee
253 ; P8LE-NEXT: li r3, 0
254 ; P8LE-NEXT: addi r1, r1, 64
255 ; P8LE-NEXT: ld r0, 16(r1)
259 ; P9LE-LABEL: caller_3:
260 ; P9LE: # %bb.0: # %entry
262 ; P9LE-NEXT: stdu r1, -64(r1)
263 ; P9LE-NEXT: std r0, 80(r1)
264 ; P9LE-NEXT: sth r3, 48(r1)
265 ; P9LE-NEXT: rldicl r3, r3, 48, 16
266 ; P9LE-NEXT: stb r3, 50(r1)
267 ; P9LE-NEXT: lhz r3, 48(r1)
268 ; P9LE-NEXT: lbz r4, 50(r1)
269 ; P9LE-NEXT: sth r3, 61(r1)
270 ; P9LE-NEXT: addi r3, r1, 61
271 ; P9LE-NEXT: stb r4, 63(r1)
272 ; P9LE-NEXT: bl callee
274 ; P9LE-NEXT: li r3, 0
275 ; P9LE-NEXT: addi r1, r1, 64
276 ; P9LE-NEXT: ld r0, 16(r1)
280 ; P10LE-LABEL: caller_3:
281 ; P10LE: # %bb.0: # %entry
282 ; P10LE-NEXT: mflr r0
283 ; P10LE-NEXT: std r0, 16(r1)
284 ; P10LE-NEXT: stdu r1, -64(r1)
285 ; P10LE-NEXT: sth r3, 48(r1)
286 ; P10LE-NEXT: rldicl r3, r3, 48, 16
287 ; P10LE-NEXT: stb r3, 50(r1)
288 ; P10LE-NEXT: lhz r3, 48(r1)
289 ; P10LE-NEXT: lbz r4, 50(r1)
290 ; P10LE-NEXT: sth r3, 61(r1)
291 ; P10LE-NEXT: addi r3, r1, 61
292 ; P10LE-NEXT: stb r4, 63(r1)
293 ; P10LE-NEXT: bl callee@notoc
294 ; P10LE-NEXT: li r3, 0
295 ; P10LE-NEXT: addi r1, r1, 64
296 ; P10LE-NEXT: ld r0, 16(r1)
297 ; P10LE-NEXT: mtlr r0
300 ; P8BE-LABEL: caller_3:
301 ; P8BE: # %bb.0: # %entry
303 ; P8BE-NEXT: stdu r1, -128(r1)
304 ; P8BE-NEXT: rldicl r4, r3, 56, 8
305 ; P8BE-NEXT: std r0, 144(r1)
306 ; P8BE-NEXT: stb r3, 183(r1)
307 ; P8BE-NEXT: sth r4, 181(r1)
308 ; P8BE-NEXT: lbz r4, 183(r1)
309 ; P8BE-NEXT: lhz r3, 181(r1)
310 ; P8BE-NEXT: stb r4, 127(r1)
311 ; P8BE-NEXT: sth r3, 125(r1)
312 ; P8BE-NEXT: addi r3, r1, 125
313 ; P8BE-NEXT: bl callee
315 ; P8BE-NEXT: li r3, 0
316 ; P8BE-NEXT: addi r1, r1, 128
317 ; P8BE-NEXT: ld r0, 16(r1)
321 ; P9BE-LABEL: caller_3:
322 ; P9BE: # %bb.0: # %entry
324 ; P9BE-NEXT: stdu r1, -128(r1)
325 ; P9BE-NEXT: rldicl r4, r3, 56, 8
326 ; P9BE-NEXT: std r0, 144(r1)
327 ; P9BE-NEXT: stb r3, 183(r1)
328 ; P9BE-NEXT: sth r4, 181(r1)
329 ; P9BE-NEXT: lbz r4, 183(r1)
330 ; P9BE-NEXT: lhz r3, 181(r1)
331 ; P9BE-NEXT: stb r4, 127(r1)
332 ; P9BE-NEXT: sth r3, 125(r1)
333 ; P9BE-NEXT: addi r3, r1, 125
334 ; P9BE-NEXT: bl callee
336 ; P9BE-NEXT: li r3, 0
337 ; P9BE-NEXT: addi r1, r1, 128
338 ; P9BE-NEXT: ld r0, 16(r1)
342 ; P10BE-LABEL: caller_3:
343 ; P10BE: # %bb.0: # %entry
344 ; P10BE-NEXT: mflr r0
345 ; P10BE-NEXT: std r0, 16(r1)
346 ; P10BE-NEXT: stdu r1, -128(r1)
347 ; P10BE-NEXT: rldicl r4, r3, 56, 8
348 ; P10BE-NEXT: stb r3, 183(r1)
349 ; P10BE-NEXT: sth r4, 181(r1)
350 ; P10BE-NEXT: lbz r4, 183(r1)
351 ; P10BE-NEXT: lhz r3, 181(r1)
352 ; P10BE-NEXT: stb r4, 127(r1)
353 ; P10BE-NEXT: sth r3, 125(r1)
354 ; P10BE-NEXT: addi r3, r1, 125
355 ; P10BE-NEXT: bl callee
357 ; P10BE-NEXT: li r3, 0
358 ; P10BE-NEXT: addi r1, r1, 128
359 ; P10BE-NEXT: ld r0, 16(r1)
360 ; P10BE-NEXT: mtlr r0
363 %_param_data = alloca [3 x i8], align 1
364 %.unpack = load i8, ptr %data, align 1
365 %.elt1 = getelementptr inbounds [3 x i8], ptr %data, i64 0, i64 1
366 %.unpack2 = load i8, ptr %.elt1, align 1
367 %.elt3 = getelementptr inbounds [3 x i8], ptr %data, i64 0, i64 2
368 %.unpack4 = load i8, ptr %.elt3, align 1
369 store i8 %.unpack, ptr %_param_data, align 1
370 %.temp.1.gep = getelementptr inbounds [3 x i8], ptr %_param_data, i64 0, i64 1
371 store i8 %.unpack2, ptr %.temp.1.gep, align 1
372 %.temp.2.gep = getelementptr inbounds [3 x i8], ptr %_param_data, i64 0, i64 2
373 store i8 %.unpack4, ptr %.temp.2.gep, align 1
374 call void @callee(ptr nonnull %_param_data)
378 define signext i8 @caller_4(ptr nocapture readonly byval([4 x i8]) %data) #0 {
379 ; P8LE-LABEL: caller_4:
380 ; P8LE: # %bb.0: # %entry
382 ; P8LE-NEXT: stdu r1, -64(r1)
383 ; P8LE-NEXT: std r0, 80(r1)
384 ; P8LE-NEXT: stw r3, 48(r1)
385 ; P8LE-NEXT: lwz r3, 48(r1)
386 ; P8LE-NEXT: stw r3, 60(r1)
387 ; P8LE-NEXT: addi r3, r1, 60
388 ; P8LE-NEXT: bl callee
390 ; P8LE-NEXT: li r3, 0
391 ; P8LE-NEXT: addi r1, r1, 64
392 ; P8LE-NEXT: ld r0, 16(r1)
396 ; P9LE-LABEL: caller_4:
397 ; P9LE: # %bb.0: # %entry
399 ; P9LE-NEXT: stdu r1, -64(r1)
400 ; P9LE-NEXT: std r0, 80(r1)
401 ; P9LE-NEXT: stw r3, 48(r1)
402 ; P9LE-NEXT: lwz r3, 48(r1)
403 ; P9LE-NEXT: stw r3, 60(r1)
404 ; P9LE-NEXT: addi r3, r1, 60
405 ; P9LE-NEXT: bl callee
407 ; P9LE-NEXT: li r3, 0
408 ; P9LE-NEXT: addi r1, r1, 64
409 ; P9LE-NEXT: ld r0, 16(r1)
413 ; P10LE-LABEL: caller_4:
414 ; P10LE: # %bb.0: # %entry
415 ; P10LE-NEXT: mflr r0
416 ; P10LE-NEXT: std r0, 16(r1)
417 ; P10LE-NEXT: stdu r1, -64(r1)
418 ; P10LE-NEXT: stw r3, 48(r1)
419 ; P10LE-NEXT: lwz r3, 48(r1)
420 ; P10LE-NEXT: stw r3, 60(r1)
421 ; P10LE-NEXT: addi r3, r1, 60
422 ; P10LE-NEXT: bl callee@notoc
423 ; P10LE-NEXT: li r3, 0
424 ; P10LE-NEXT: addi r1, r1, 64
425 ; P10LE-NEXT: ld r0, 16(r1)
426 ; P10LE-NEXT: mtlr r0
429 ; P8BE-LABEL: caller_4:
430 ; P8BE: # %bb.0: # %entry
432 ; P8BE-NEXT: stdu r1, -128(r1)
433 ; P8BE-NEXT: std r0, 144(r1)
434 ; P8BE-NEXT: stw r3, 180(r1)
435 ; P8BE-NEXT: lwz r3, 180(r1)
436 ; P8BE-NEXT: stw r3, 124(r1)
437 ; P8BE-NEXT: addi r3, r1, 124
438 ; P8BE-NEXT: bl callee
440 ; P8BE-NEXT: li r3, 0
441 ; P8BE-NEXT: addi r1, r1, 128
442 ; P8BE-NEXT: ld r0, 16(r1)
446 ; P9BE-LABEL: caller_4:
447 ; P9BE: # %bb.0: # %entry
449 ; P9BE-NEXT: stdu r1, -128(r1)
450 ; P9BE-NEXT: std r0, 144(r1)
451 ; P9BE-NEXT: stw r3, 180(r1)
452 ; P9BE-NEXT: lwz r3, 180(r1)
453 ; P9BE-NEXT: stw r3, 124(r1)
454 ; P9BE-NEXT: addi r3, r1, 124
455 ; P9BE-NEXT: bl callee
457 ; P9BE-NEXT: li r3, 0
458 ; P9BE-NEXT: addi r1, r1, 128
459 ; P9BE-NEXT: ld r0, 16(r1)
463 ; P10BE-LABEL: caller_4:
464 ; P10BE: # %bb.0: # %entry
465 ; P10BE-NEXT: mflr r0
466 ; P10BE-NEXT: std r0, 16(r1)
467 ; P10BE-NEXT: stdu r1, -128(r1)
468 ; P10BE-NEXT: stw r3, 180(r1)
469 ; P10BE-NEXT: lwz r3, 180(r1)
470 ; P10BE-NEXT: stw r3, 124(r1)
471 ; P10BE-NEXT: addi r3, r1, 124
472 ; P10BE-NEXT: bl callee
474 ; P10BE-NEXT: li r3, 0
475 ; P10BE-NEXT: addi r1, r1, 128
476 ; P10BE-NEXT: ld r0, 16(r1)
477 ; P10BE-NEXT: mtlr r0
480 %_param_data = alloca [4 x i8], align 1
481 %.unpack = load i8, ptr %data, align 1
482 %.elt1 = getelementptr inbounds [4 x i8], ptr %data, i64 0, i64 1
483 %.unpack2 = load i8, ptr %.elt1, align 1
484 %.elt3 = getelementptr inbounds [4 x i8], ptr %data, i64 0, i64 2
485 %.unpack4 = load i8, ptr %.elt3, align 1
486 %.elt5 = getelementptr inbounds [4 x i8], ptr %data, i64 0, i64 3
487 %.unpack6 = load i8, ptr %.elt5, align 1
488 store i8 %.unpack, ptr %_param_data, align 1
489 %.temp.1.gep = getelementptr inbounds [4 x i8], ptr %_param_data, i64 0, i64 1
490 store i8 %.unpack2, ptr %.temp.1.gep, align 1
491 %.temp.2.gep = getelementptr inbounds [4 x i8], ptr %_param_data, i64 0, i64 2
492 store i8 %.unpack4, ptr %.temp.2.gep, align 1
493 %.temp.3.gep = getelementptr inbounds [4 x i8], ptr %_param_data, i64 0, i64 3
494 store i8 %.unpack6, ptr %.temp.3.gep, align 1
495 call void @callee(ptr nonnull %_param_data)
499 define signext i8 @caller_5(ptr nocapture readonly byval([5 x i8]) %data) #0 {
500 ; P8LE-LABEL: caller_5:
501 ; P8LE: # %bb.0: # %entry
503 ; P8LE-NEXT: stdu r1, -64(r1)
504 ; P8LE-NEXT: rldicl r4, r3, 32, 32
505 ; P8LE-NEXT: std r0, 80(r1)
506 ; P8LE-NEXT: stw r3, 48(r1)
507 ; P8LE-NEXT: stw r3, 59(r1)
508 ; P8LE-NEXT: addi r3, r1, 59
509 ; P8LE-NEXT: stb r4, 52(r1)
510 ; P8LE-NEXT: lbz r4, 52(r1)
511 ; P8LE-NEXT: stb r4, 63(r1)
512 ; P8LE-NEXT: bl callee
514 ; P8LE-NEXT: li r3, 0
515 ; P8LE-NEXT: addi r1, r1, 64
516 ; P8LE-NEXT: ld r0, 16(r1)
520 ; P9LE-LABEL: caller_5:
521 ; P9LE: # %bb.0: # %entry
523 ; P9LE-NEXT: stdu r1, -64(r1)
524 ; P9LE-NEXT: rldicl r4, r3, 32, 32
525 ; P9LE-NEXT: std r0, 80(r1)
526 ; P9LE-NEXT: stw r3, 48(r1)
527 ; P9LE-NEXT: stw r3, 59(r1)
528 ; P9LE-NEXT: addi r3, r1, 59
529 ; P9LE-NEXT: stb r4, 52(r1)
530 ; P9LE-NEXT: lbz r4, 52(r1)
531 ; P9LE-NEXT: stb r4, 63(r1)
532 ; P9LE-NEXT: bl callee
534 ; P9LE-NEXT: li r3, 0
535 ; P9LE-NEXT: addi r1, r1, 64
536 ; P9LE-NEXT: ld r0, 16(r1)
540 ; P10LE-LABEL: caller_5:
541 ; P10LE: # %bb.0: # %entry
542 ; P10LE-NEXT: mflr r0
543 ; P10LE-NEXT: std r0, 16(r1)
544 ; P10LE-NEXT: stdu r1, -64(r1)
545 ; P10LE-NEXT: rldicl r4, r3, 32, 32
546 ; P10LE-NEXT: stw r3, 48(r1)
547 ; P10LE-NEXT: stw r3, 59(r1)
548 ; P10LE-NEXT: addi r3, r1, 59
549 ; P10LE-NEXT: stb r4, 52(r1)
550 ; P10LE-NEXT: lbz r4, 52(r1)
551 ; P10LE-NEXT: stb r4, 63(r1)
552 ; P10LE-NEXT: bl callee@notoc
553 ; P10LE-NEXT: li r3, 0
554 ; P10LE-NEXT: addi r1, r1, 64
555 ; P10LE-NEXT: ld r0, 16(r1)
556 ; P10LE-NEXT: mtlr r0
559 ; P8BE-LABEL: caller_5:
560 ; P8BE: # %bb.0: # %entry
562 ; P8BE-NEXT: stdu r1, -128(r1)
563 ; P8BE-NEXT: std r0, 144(r1)
564 ; P8BE-NEXT: stb r3, 183(r1)
565 ; P8BE-NEXT: rldicl r3, r3, 56, 8
566 ; P8BE-NEXT: lbz r4, 183(r1)
567 ; P8BE-NEXT: stw r3, 179(r1)
568 ; P8BE-NEXT: stw r3, 123(r1)
569 ; P8BE-NEXT: addi r3, r1, 123
570 ; P8BE-NEXT: stb r4, 127(r1)
571 ; P8BE-NEXT: bl callee
573 ; P8BE-NEXT: li r3, 0
574 ; P8BE-NEXT: addi r1, r1, 128
575 ; P8BE-NEXT: ld r0, 16(r1)
579 ; P9BE-LABEL: caller_5:
580 ; P9BE: # %bb.0: # %entry
582 ; P9BE-NEXT: stdu r1, -128(r1)
583 ; P9BE-NEXT: std r0, 144(r1)
584 ; P9BE-NEXT: stb r3, 183(r1)
585 ; P9BE-NEXT: lbz r4, 183(r1)
586 ; P9BE-NEXT: rldicl r3, r3, 56, 8
587 ; P9BE-NEXT: stw r3, 179(r1)
588 ; P9BE-NEXT: stw r3, 123(r1)
589 ; P9BE-NEXT: addi r3, r1, 123
590 ; P9BE-NEXT: stb r4, 127(r1)
591 ; P9BE-NEXT: bl callee
593 ; P9BE-NEXT: li r3, 0
594 ; P9BE-NEXT: addi r1, r1, 128
595 ; P9BE-NEXT: ld r0, 16(r1)
599 ; P10BE-LABEL: caller_5:
600 ; P10BE: # %bb.0: # %entry
601 ; P10BE-NEXT: mflr r0
602 ; P10BE-NEXT: std r0, 16(r1)
603 ; P10BE-NEXT: stdu r1, -128(r1)
604 ; P10BE-NEXT: stb r3, 183(r1)
605 ; P10BE-NEXT: rldicl r3, r3, 56, 8
606 ; P10BE-NEXT: lbz r4, 183(r1)
607 ; P10BE-NEXT: stw r3, 179(r1)
608 ; P10BE-NEXT: stw r3, 123(r1)
609 ; P10BE-NEXT: addi r3, r1, 123
610 ; P10BE-NEXT: stb r4, 127(r1)
611 ; P10BE-NEXT: bl callee
613 ; P10BE-NEXT: li r3, 0
614 ; P10BE-NEXT: addi r1, r1, 128
615 ; P10BE-NEXT: ld r0, 16(r1)
616 ; P10BE-NEXT: mtlr r0
619 %_param_data = alloca [5 x i8], align 1
620 %.unpack = load i8, ptr %data, align 1
621 %.elt1 = getelementptr inbounds [5 x i8], ptr %data, i64 0, i64 1
622 %.unpack2 = load i8, ptr %.elt1, align 1
623 %.elt3 = getelementptr inbounds [5 x i8], ptr %data, i64 0, i64 2
624 %.unpack4 = load i8, ptr %.elt3, align 1
625 %.elt5 = getelementptr inbounds [5 x i8], ptr %data, i64 0, i64 3
626 %.unpack6 = load i8, ptr %.elt5, align 1
627 %.elt7 = getelementptr inbounds [5 x i8], ptr %data, i64 0, i64 4
628 %.unpack8 = load i8, ptr %.elt7, align 1
629 store i8 %.unpack, ptr %_param_data, align 1
630 %.temp.1.gep = getelementptr inbounds [5 x i8], ptr %_param_data, i64 0, i64 1
631 store i8 %.unpack2, ptr %.temp.1.gep, align 1
632 %.temp.2.gep = getelementptr inbounds [5 x i8], ptr %_param_data, i64 0, i64 2
633 store i8 %.unpack4, ptr %.temp.2.gep, align 1
634 %.temp.3.gep = getelementptr inbounds [5 x i8], ptr %_param_data, i64 0, i64 3
635 store i8 %.unpack6, ptr %.temp.3.gep, align 1
636 %.temp.4.gep = getelementptr inbounds [5 x i8], ptr %_param_data, i64 0, i64 4
637 store i8 %.unpack8, ptr %.temp.4.gep, align 1
638 call void @callee(ptr nonnull %_param_data)
642 define signext i8 @caller_6(ptr nocapture readonly byval([6 x i8]) %data) #0 {
643 ; P8LE-LABEL: caller_6:
644 ; P8LE: # %bb.0: # %entry
646 ; P8LE-NEXT: stdu r1, -64(r1)
647 ; P8LE-NEXT: std r0, 80(r1)
648 ; P8LE-NEXT: stw r3, 48(r1)
649 ; P8LE-NEXT: rldicl r3, r3, 32, 32
650 ; P8LE-NEXT: sth r3, 52(r1)
651 ; P8LE-NEXT: lwz r3, 48(r1)
652 ; P8LE-NEXT: lhz r4, 52(r1)
653 ; P8LE-NEXT: stw r3, 58(r1)
654 ; P8LE-NEXT: addi r3, r1, 58
655 ; P8LE-NEXT: sth r4, 62(r1)
656 ; P8LE-NEXT: bl callee
658 ; P8LE-NEXT: li r3, 0
659 ; P8LE-NEXT: addi r1, r1, 64
660 ; P8LE-NEXT: ld r0, 16(r1)
664 ; P9LE-LABEL: caller_6:
665 ; P9LE: # %bb.0: # %entry
667 ; P9LE-NEXT: stdu r1, -64(r1)
668 ; P9LE-NEXT: std r0, 80(r1)
669 ; P9LE-NEXT: stw r3, 48(r1)
670 ; P9LE-NEXT: rldicl r3, r3, 32, 32
671 ; P9LE-NEXT: sth r3, 52(r1)
672 ; P9LE-NEXT: lwz r3, 48(r1)
673 ; P9LE-NEXT: lhz r4, 52(r1)
674 ; P9LE-NEXT: stw r3, 58(r1)
675 ; P9LE-NEXT: addi r3, r1, 58
676 ; P9LE-NEXT: sth r4, 62(r1)
677 ; P9LE-NEXT: bl callee
679 ; P9LE-NEXT: li r3, 0
680 ; P9LE-NEXT: addi r1, r1, 64
681 ; P9LE-NEXT: ld r0, 16(r1)
685 ; P10LE-LABEL: caller_6:
686 ; P10LE: # %bb.0: # %entry
687 ; P10LE-NEXT: mflr r0
688 ; P10LE-NEXT: std r0, 16(r1)
689 ; P10LE-NEXT: stdu r1, -64(r1)
690 ; P10LE-NEXT: stw r3, 48(r1)
691 ; P10LE-NEXT: rldicl r3, r3, 32, 32
692 ; P10LE-NEXT: sth r3, 52(r1)
693 ; P10LE-NEXT: lwz r3, 48(r1)
694 ; P10LE-NEXT: lhz r4, 52(r1)
695 ; P10LE-NEXT: stw r3, 58(r1)
696 ; P10LE-NEXT: addi r3, r1, 58
697 ; P10LE-NEXT: sth r4, 62(r1)
698 ; P10LE-NEXT: bl callee@notoc
699 ; P10LE-NEXT: li r3, 0
700 ; P10LE-NEXT: addi r1, r1, 64
701 ; P10LE-NEXT: ld r0, 16(r1)
702 ; P10LE-NEXT: mtlr r0
705 ; P8BE-LABEL: caller_6:
706 ; P8BE: # %bb.0: # %entry
708 ; P8BE-NEXT: stdu r1, -128(r1)
709 ; P8BE-NEXT: rldicl r4, r3, 48, 16
710 ; P8BE-NEXT: std r0, 144(r1)
711 ; P8BE-NEXT: sth r3, 182(r1)
712 ; P8BE-NEXT: stw r4, 178(r1)
713 ; P8BE-NEXT: lhz r4, 182(r1)
714 ; P8BE-NEXT: lwz r3, 178(r1)
715 ; P8BE-NEXT: sth r4, 126(r1)
716 ; P8BE-NEXT: stw r3, 122(r1)
717 ; P8BE-NEXT: addi r3, r1, 122
718 ; P8BE-NEXT: bl callee
720 ; P8BE-NEXT: li r3, 0
721 ; P8BE-NEXT: addi r1, r1, 128
722 ; P8BE-NEXT: ld r0, 16(r1)
726 ; P9BE-LABEL: caller_6:
727 ; P9BE: # %bb.0: # %entry
729 ; P9BE-NEXT: stdu r1, -128(r1)
730 ; P9BE-NEXT: rldicl r4, r3, 48, 16
731 ; P9BE-NEXT: std r0, 144(r1)
732 ; P9BE-NEXT: sth r3, 182(r1)
733 ; P9BE-NEXT: stw r4, 178(r1)
734 ; P9BE-NEXT: lhz r4, 182(r1)
735 ; P9BE-NEXT: lwz r3, 178(r1)
736 ; P9BE-NEXT: sth r4, 126(r1)
737 ; P9BE-NEXT: stw r3, 122(r1)
738 ; P9BE-NEXT: addi r3, r1, 122
739 ; P9BE-NEXT: bl callee
741 ; P9BE-NEXT: li r3, 0
742 ; P9BE-NEXT: addi r1, r1, 128
743 ; P9BE-NEXT: ld r0, 16(r1)
747 ; P10BE-LABEL: caller_6:
748 ; P10BE: # %bb.0: # %entry
749 ; P10BE-NEXT: mflr r0
750 ; P10BE-NEXT: std r0, 16(r1)
751 ; P10BE-NEXT: stdu r1, -128(r1)
752 ; P10BE-NEXT: rldicl r4, r3, 48, 16
753 ; P10BE-NEXT: sth r3, 182(r1)
754 ; P10BE-NEXT: stw r4, 178(r1)
755 ; P10BE-NEXT: lhz r4, 182(r1)
756 ; P10BE-NEXT: lwz r3, 178(r1)
757 ; P10BE-NEXT: sth r4, 126(r1)
758 ; P10BE-NEXT: stw r3, 122(r1)
759 ; P10BE-NEXT: addi r3, r1, 122
760 ; P10BE-NEXT: bl callee
762 ; P10BE-NEXT: li r3, 0
763 ; P10BE-NEXT: addi r1, r1, 128
764 ; P10BE-NEXT: ld r0, 16(r1)
765 ; P10BE-NEXT: mtlr r0
768 %_param_data = alloca [6 x i8], align 1
769 %.unpack = load i8, ptr %data, align 1
770 %.elt1 = getelementptr inbounds [6 x i8], ptr %data, i64 0, i64 1
771 %.unpack2 = load i8, ptr %.elt1, align 1
772 %.elt3 = getelementptr inbounds [6 x i8], ptr %data, i64 0, i64 2
773 %.unpack4 = load i8, ptr %.elt3, align 1
774 %.elt5 = getelementptr inbounds [6 x i8], ptr %data, i64 0, i64 3
775 %.unpack6 = load i8, ptr %.elt5, align 1
776 %.elt7 = getelementptr inbounds [6 x i8], ptr %data, i64 0, i64 4
777 %.unpack8 = load i8, ptr %.elt7, align 1
778 %.elt9 = getelementptr inbounds [6 x i8], ptr %data, i64 0, i64 5
779 %.unpack10 = load i8, ptr %.elt9, align 1
780 store i8 %.unpack, ptr %_param_data, align 1
781 %.temp.1.gep = getelementptr inbounds [6 x i8], ptr %_param_data, i64 0, i64 1
782 store i8 %.unpack2, ptr %.temp.1.gep, align 1
783 %.temp.2.gep = getelementptr inbounds [6 x i8], ptr %_param_data, i64 0, i64 2
784 store i8 %.unpack4, ptr %.temp.2.gep, align 1
785 %.temp.3.gep = getelementptr inbounds [6 x i8], ptr %_param_data, i64 0, i64 3
786 store i8 %.unpack6, ptr %.temp.3.gep, align 1
787 %.temp.4.gep = getelementptr inbounds [6 x i8], ptr %_param_data, i64 0, i64 4
788 store i8 %.unpack8, ptr %.temp.4.gep, align 1
789 %.temp.5.gep = getelementptr inbounds [6 x i8], ptr %_param_data, i64 0, i64 5
790 store i8 %.unpack10, ptr %.temp.5.gep, align 1
791 call void @callee(ptr nonnull %_param_data)
795 define signext i8 @caller_7(ptr nocapture readonly byval([7 x i8]) %data) #0 {
796 ; P8LE-LABEL: caller_7:
797 ; P8LE: # %bb.0: # %entry
799 ; P8LE-NEXT: stdu r1, -64(r1)
800 ; P8LE-NEXT: rldicl r4, r3, 32, 32
801 ; P8LE-NEXT: std r0, 80(r1)
802 ; P8LE-NEXT: stw r3, 48(r1)
803 ; P8LE-NEXT: stw r3, 57(r1)
804 ; P8LE-NEXT: sth r4, 52(r1)
805 ; P8LE-NEXT: rldicl r4, r3, 16, 48
806 ; P8LE-NEXT: stb r4, 54(r1)
807 ; P8LE-NEXT: lhz r4, 52(r1)
808 ; P8LE-NEXT: lbz r3, 54(r1)
809 ; P8LE-NEXT: sth r4, 61(r1)
810 ; P8LE-NEXT: stb r3, 63(r1)
811 ; P8LE-NEXT: addi r3, r1, 57
812 ; P8LE-NEXT: bl callee
814 ; P8LE-NEXT: li r3, 0
815 ; P8LE-NEXT: addi r1, r1, 64
816 ; P8LE-NEXT: ld r0, 16(r1)
820 ; P9LE-LABEL: caller_7:
821 ; P9LE: # %bb.0: # %entry
823 ; P9LE-NEXT: stdu r1, -64(r1)
824 ; P9LE-NEXT: rldicl r4, r3, 32, 32
825 ; P9LE-NEXT: std r0, 80(r1)
826 ; P9LE-NEXT: stw r3, 48(r1)
827 ; P9LE-NEXT: stw r3, 57(r1)
828 ; P9LE-NEXT: sth r4, 52(r1)
829 ; P9LE-NEXT: rldicl r4, r3, 16, 48
830 ; P9LE-NEXT: addi r3, r1, 57
831 ; P9LE-NEXT: stb r4, 54(r1)
832 ; P9LE-NEXT: lhz r4, 52(r1)
833 ; P9LE-NEXT: lbz r5, 54(r1)
834 ; P9LE-NEXT: sth r4, 61(r1)
835 ; P9LE-NEXT: stb r5, 63(r1)
836 ; P9LE-NEXT: bl callee
838 ; P9LE-NEXT: li r3, 0
839 ; P9LE-NEXT: addi r1, r1, 64
840 ; P9LE-NEXT: ld r0, 16(r1)
844 ; P10LE-LABEL: caller_7:
845 ; P10LE: # %bb.0: # %entry
846 ; P10LE-NEXT: mflr r0
847 ; P10LE-NEXT: std r0, 16(r1)
848 ; P10LE-NEXT: stdu r1, -64(r1)
849 ; P10LE-NEXT: rldicl r4, r3, 32, 32
850 ; P10LE-NEXT: stw r3, 48(r1)
851 ; P10LE-NEXT: stw r3, 57(r1)
852 ; P10LE-NEXT: sth r4, 52(r1)
853 ; P10LE-NEXT: rldicl r4, r3, 16, 48
854 ; P10LE-NEXT: addi r3, r1, 57
855 ; P10LE-NEXT: stb r4, 54(r1)
856 ; P10LE-NEXT: lhz r4, 52(r1)
857 ; P10LE-NEXT: lbz r5, 54(r1)
858 ; P10LE-NEXT: sth r4, 61(r1)
859 ; P10LE-NEXT: stb r5, 63(r1)
860 ; P10LE-NEXT: bl callee@notoc
861 ; P10LE-NEXT: li r3, 0
862 ; P10LE-NEXT: addi r1, r1, 64
863 ; P10LE-NEXT: ld r0, 16(r1)
864 ; P10LE-NEXT: mtlr r0
867 ; P8BE-LABEL: caller_7:
868 ; P8BE: # %bb.0: # %entry
870 ; P8BE-NEXT: stdu r1, -128(r1)
871 ; P8BE-NEXT: std r0, 144(r1)
872 ; P8BE-NEXT: rldicl r4, r3, 56, 8
873 ; P8BE-NEXT: stb r3, 183(r1)
874 ; P8BE-NEXT: rldicl r3, r3, 40, 24
875 ; P8BE-NEXT: stw r3, 177(r1)
876 ; P8BE-NEXT: stw r3, 121(r1)
877 ; P8BE-NEXT: lbz r3, 183(r1)
878 ; P8BE-NEXT: sth r4, 181(r1)
879 ; P8BE-NEXT: lhz r4, 181(r1)
880 ; P8BE-NEXT: stb r3, 127(r1)
881 ; P8BE-NEXT: addi r3, r1, 121
882 ; P8BE-NEXT: sth r4, 125(r1)
883 ; P8BE-NEXT: bl callee
885 ; P8BE-NEXT: li r3, 0
886 ; P8BE-NEXT: addi r1, r1, 128
887 ; P8BE-NEXT: ld r0, 16(r1)
891 ; P9BE-LABEL: caller_7:
892 ; P9BE: # %bb.0: # %entry
894 ; P9BE-NEXT: stdu r1, -128(r1)
895 ; P9BE-NEXT: rldicl r4, r3, 56, 8
896 ; P9BE-NEXT: std r0, 144(r1)
897 ; P9BE-NEXT: stb r3, 183(r1)
898 ; P9BE-NEXT: lbz r5, 183(r1)
899 ; P9BE-NEXT: rldicl r3, r3, 40, 24
900 ; P9BE-NEXT: sth r4, 181(r1)
901 ; P9BE-NEXT: stw r3, 177(r1)
902 ; P9BE-NEXT: lhz r4, 181(r1)
903 ; P9BE-NEXT: stw r3, 121(r1)
904 ; P9BE-NEXT: addi r3, r1, 121
905 ; P9BE-NEXT: stb r5, 127(r1)
906 ; P9BE-NEXT: sth r4, 125(r1)
907 ; P9BE-NEXT: bl callee
909 ; P9BE-NEXT: li r3, 0
910 ; P9BE-NEXT: addi r1, r1, 128
911 ; P9BE-NEXT: ld r0, 16(r1)
915 ; P10BE-LABEL: caller_7:
916 ; P10BE: # %bb.0: # %entry
917 ; P10BE-NEXT: mflr r0
918 ; P10BE-NEXT: std r0, 16(r1)
919 ; P10BE-NEXT: stdu r1, -128(r1)
920 ; P10BE-NEXT: rldicl r4, r3, 56, 8
921 ; P10BE-NEXT: stb r3, 183(r1)
922 ; P10BE-NEXT: rldicl r3, r3, 40, 24
923 ; P10BE-NEXT: lbz r5, 183(r1)
924 ; P10BE-NEXT: sth r4, 181(r1)
925 ; P10BE-NEXT: stw r3, 177(r1)
926 ; P10BE-NEXT: stw r3, 121(r1)
927 ; P10BE-NEXT: addi r3, r1, 121
928 ; P10BE-NEXT: lhz r4, 181(r1)
929 ; P10BE-NEXT: stb r5, 127(r1)
930 ; P10BE-NEXT: sth r4, 125(r1)
931 ; P10BE-NEXT: bl callee
933 ; P10BE-NEXT: li r3, 0
934 ; P10BE-NEXT: addi r1, r1, 128
935 ; P10BE-NEXT: ld r0, 16(r1)
936 ; P10BE-NEXT: mtlr r0
939 %_param_data = alloca [7 x i8], align 1
940 %.unpack = load i8, ptr %data, align 1
941 %.elt1 = getelementptr inbounds [7 x i8], ptr %data, i64 0, i64 1
942 %.unpack2 = load i8, ptr %.elt1, align 1
943 %.elt3 = getelementptr inbounds [7 x i8], ptr %data, i64 0, i64 2
944 %.unpack4 = load i8, ptr %.elt3, align 1
945 %.elt5 = getelementptr inbounds [7 x i8], ptr %data, i64 0, i64 3
946 %.unpack6 = load i8, ptr %.elt5, align 1
947 %.elt7 = getelementptr inbounds [7 x i8], ptr %data, i64 0, i64 4
948 %.unpack8 = load i8, ptr %.elt7, align 1
949 %.elt9 = getelementptr inbounds [7 x i8], ptr %data, i64 0, i64 5
950 %.unpack10 = load i8, ptr %.elt9, align 1
951 %.elt11 = getelementptr inbounds [7 x i8], ptr %data, i64 0, i64 6
952 %.unpack12 = load i8, ptr %.elt11, align 1
953 store i8 %.unpack, ptr %_param_data, align 1
954 %.temp.1.gep = getelementptr inbounds [7 x i8], ptr %_param_data, i64 0, i64 1
955 store i8 %.unpack2, ptr %.temp.1.gep, align 1
956 %.temp.2.gep = getelementptr inbounds [7 x i8], ptr %_param_data, i64 0, i64 2
957 store i8 %.unpack4, ptr %.temp.2.gep, align 1
958 %.temp.3.gep = getelementptr inbounds [7 x i8], ptr %_param_data, i64 0, i64 3
959 store i8 %.unpack6, ptr %.temp.3.gep, align 1
960 %.temp.4.gep = getelementptr inbounds [7 x i8], ptr %_param_data, i64 0, i64 4
961 store i8 %.unpack8, ptr %.temp.4.gep, align 1
962 %.temp.5.gep = getelementptr inbounds [7 x i8], ptr %_param_data, i64 0, i64 5
963 store i8 %.unpack10, ptr %.temp.5.gep, align 1
964 %.temp.6.gep = getelementptr inbounds [7 x i8], ptr %_param_data, i64 0, i64 6
965 store i8 %.unpack12, ptr %.temp.6.gep, align 1
966 call void @callee(ptr nonnull %_param_data)
970 declare void @callee(ptr) local_unnamed_addr #0
972 attributes #0 = { nounwind }