1 ; RUN: llc -verify-machineinstrs -stop-before=ppc-vsx-copy \
2 ; RUN: -mcpu=pwr4 -mattr=-altivec \
3 ; RUN: -mtriple powerpc-ibm-aix-xcoff < %s | \
4 ; RUN: FileCheck --check-prefixes=CHECK,32BIT %s
6 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \
7 ; RUN: -mtriple powerpc-ibm-aix-xcoff < %s | \
8 ; RUN: FileCheck --check-prefixes=CHECKASM,ASM32BIT %s
10 ; RUN: llc -verify-machineinstrs -stop-before=ppc-vsx-copy \
11 ; RUN: -mcpu=pwr4 -mattr=-altivec \
12 ; RUN: -mtriple powerpc64-ibm-aix-xcoff < %s | \
13 ; RUN: FileCheck --check-prefixes=CHECK,64BIT %s
15 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \
16 ; RUN: -mtriple powerpc64-ibm-aix-xcoff < %s | \
17 ; RUN: FileCheck --check-prefixes=CHECKASM,ASM64BIT %s
19 %struct_S1 = type { i8 }
21 @gS1 = external global %struct_S1, align 1
23 define void @call_test_byval_mem1() {
25 %call = call zeroext i8 @test_byval_mem1(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, ptr byval(%struct_S1) align 1 @gS1)
30 ; CHECKASM-LABEL: .call_test_byval_mem1:
32 ; ASM32BIT: stwu 1, -64(1)
33 ; ASM32BIT: lwz [[REG1:[0-9]+]], L..C{{[0-9]+}}(2)
34 ; ASM32BIT: lbz [[REG2:[0-9]+]], 0([[REG1]])
35 ; ASM32BIT: stb [[REG2]], 56(1)
36 ; ASM32BIT: bl .test_byval_mem1
37 ; ASM32BIT: addi 1, 1, 64
39 ; ASM64BIT: stdu 1, -128(1)
40 ; ASM64BIT: ld [[REG1:[0-9]+]], L..C{{[0-9]+}}(2)
41 ; ASM64BIT: lbz [[REG2:[0-9]+]], 0([[REG1]])
42 ; ASM64BIT: stb [[REG2]], 112(1)
43 ; ASM64BIT: bl .test_byval_mem1
44 ; ASM64BIT: addi 1, 1, 128
46 define zeroext i8 @test_byval_mem1(i32, i32, i32, i32, i32, i32, i32, i32, ptr byval(%struct_S1) align 1 %s) {
48 %load = load i8, ptr %s, align 1
52 ; CHECK-LABEL: name: test_byval_mem1
55 ; 32BIT-NEXT: - { id: 0, type: default, offset: 56, size: 4, alignment: 8, stack-id: default,
57 ; 32BIT-NEXT: %[[VAL:[0-9]+]]:gprc = LBZ 0, %fixed-stack.0
58 ; 32BIT-NEXT: $r3 = COPY %[[VAL]]
62 ; 64BIT-NEXT: - { id: 0, type: default, offset: 112, size: 8, alignment: 16, stack-id: default,
64 ; 64BIT-NEXT: %[[VAL:[0-9]+]]:g8rc = LBZ8 0, %fixed-stack.0
65 ; 64BIT-NEXT: $x3 = COPY %[[VAL]]
69 %struct_S256 = type { [256 x i8] }
71 @gS256 = external global %struct_S256, align 1
73 define void @call_test_byval_mem2() {
75 %call = call zeroext i8 @test_byval_mem2(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, ptr byval(%struct_S256) align 1 @gS256)
80 ; CHECK-LABEL: name: call_test_byval_mem2
82 ; Confirm the expected memcpy call is independent of the call to test_byval_mem2.
83 ; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
84 ; 32BIT-NEXT: %0:gprc = nuw ADDI $r1, 56
85 ; 32BIT-NEXT: %1:gprc = LWZtoc @gS256, $r2 :: (load (s32) from got)
86 ; 32BIT-NEXT: %2:gprc = LI 256
87 ; 32BIT-DAG: $r3 = COPY %0
88 ; 32BIT-DAG: $r4 = COPY %1
89 ; 32BIT-DAG: $r5 = COPY %2
90 ; 32BIT-NEXT: BL_NOP &".___memmove[PR]", csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r2, implicit-def $r1, implicit-def $r3
91 ; 32BIT-NEXT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
92 ; 32BIT: ADJCALLSTACKDOWN 312, 0, implicit-def dead $r1, implicit $r1
93 ; 32BIT-DAG: $r3 = COPY %{{[0-9]+}}
94 ; 32BIT-DAG: $r4 = COPY %{{[0-9]+}}
95 ; 32BIT-DAG: $r5 = COPY %{{[0-9]+}}
96 ; 32BIT-DAG: $r6 = COPY %{{[0-9]+}}
97 ; 32BIT-DAG: $r7 = COPY %{{[0-9]+}}
98 ; 32BIT-DAG: $r8 = COPY %{{[0-9]+}}
99 ; 32BIT-DAG: $r9 = COPY %{{[0-9]+}}
100 ; 32BIT-DAG: $r10 = COPY %{{[0-9]+}}
101 ; 32BIT-NEXT: BL_NOP <mcsymbol .test_byval_mem2>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1
102 ; 32BIT-NEXT: ADJCALLSTACKUP 312, 0, implicit-def dead $r1, implicit $r1
104 ; CHECKASM-LABEL: .call_test_byval_mem2:
106 ; ASM32BIT: stwu 1, -320(1)
107 ; ASM32BIT-DAG: addi 3, 1, 56
108 ; ASM32BIT-DAG: lwz 4, L..C{{[0-9]+}}(2)
109 ; ASM32BIT-DAG: li 5, 256
110 ; ASM32BIT-DAG: stw 0, 328(1)
111 ; ASM32BIT-NEXT: bl .___memmove[PR]
112 ; ASM32BIT: bl .test_byval_mem2
113 ; ASM32BIT: addi 1, 1, 320
115 ; Confirm the expected memcpy call is independent of the call to test_byval_mem2.
116 ; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
117 ; 64BIT-NEXT: %0:g8rc = nuw ADDI8 $x1, 112
118 ; 64BIT-NEXT: %1:g8rc = LDtoc @gS256, $x2 :: (load (s64) from got)
119 ; 64BIT-NEXT: %2:g8rc = LI8 256
120 ; 64BIT-DAG: $x3 = COPY %0
121 ; 64BIT-DAG: $x4 = COPY %1
122 ; 64BIT-DAG: $x5 = COPY %2
123 ; 64BIT-NEXT: BL8_NOP &".___memmove64[PR]", csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x2, implicit-def $r1, implicit-def $x3
124 ; 64BIT-NEXT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
125 ; 64BIT: ADJCALLSTACKDOWN 368, 0, implicit-def dead $r1, implicit $r1
126 ; 64BIT-DAG: $x3 = COPY %{{[0-9]+}}
127 ; 64BIT-DAG: $x4 = COPY %{{[0-9]+}}
128 ; 64BIT-DAG: $x5 = COPY %{{[0-9]+}}
129 ; 64BIT-DAG: $x6 = COPY %{{[0-9]+}}
130 ; 64BIT-DAG: $x7 = COPY %{{[0-9]+}}
131 ; 64BIT-DAG: $x8 = COPY %{{[0-9]+}}
132 ; 64BIT-DAG: $x9 = COPY %{{[0-9]+}}
133 ; 64BIT-DAG: $x10 = COPY %{{[0-9]+}}
134 ; 64BIT-NEXT: BL8_NOP <mcsymbol .test_byval_mem2>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1
135 ; 64BIT-NEXT: ADJCALLSTACKUP 368, 0, implicit-def dead $r1, implicit $r1
137 ; ASM64BIT: stdu 1, -368(1)
138 ; ASM64BIT-DAG: addi 3, 1, 112
139 ; ASM64BIT-DAG: ld 4, L..C{{[0-9]+}}(2)
140 ; ASM64BIT-DAG: li 5, 256
141 ; ASM64BIT-DAG: std 0, 384(1)
142 ; ASM64BIT-NEXT: bl .___memmove64[PR]
143 ; ASM64BIT: bl .test_byval_mem2
144 ; ASM64BIT: addi 1, 1, 368
147 define zeroext i8 @test_byval_mem2(i32, i32, i32, i32, i32, i32, i32, i32, ptr byval(%struct_S256) align 1 %s) {
149 %gep = getelementptr inbounds %struct_S256, ptr %s, i32 0, i32 0, i32 255
150 %load = load i8, ptr %gep, align 1
154 ; CHECK-LABEL: name: test_byval_mem2
157 ; 32BIT-NEXT: - { id: 0, type: default, offset: 56, size: 256, alignment: 8, stack-id: default,
159 ; 32BIT-NEXT: %[[VAL:[0-9]+]]:gprc = LBZ 255, %fixed-stack.0
160 ; 32BIT-NEXT: $r3 = COPY %[[VAL]]
164 ; 64BIT-NEXT: - { id: 0, type: default, offset: 112, size: 256, alignment: 16, stack-id: default,
166 ; 64BIT-NEXT: %[[VAL:[0-9]+]]:g8rc = LBZ8 255, %fixed-stack.0
167 ; 64BIT-NEXT: $x3 = COPY %[[VAL]]
170 %struct_S57 = type { [57 x i8] }
172 @gS57 = external global %struct_S57, align 1
174 define void @call_test_byval_mem3() {
176 call void @test_byval_mem3(i32 42, float 0x40091EB860000000, ptr byval(%struct_S57) align 1 @gS57)
180 ; CHECK-LABEL: name: call_test_byval_mem3
182 ; Confirm the expected memcpy call is independent of the call to test_byval_mem3.
183 ; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
184 ; 32BIT-NEXT: %0:gprc_and_gprc_nor0 = LWZtoc @gS57, $r2 :: (load (s32) from got)
185 ; 32BIT-NEXT: %1:gprc = nuw ADDI %0, 24
186 ; 32BIT-NEXT: %2:gprc = nuw ADDI $r1, 56
187 ; 32BIT-NEXT: %3:gprc = LI 33
188 ; 32BIT-DAG: $r3 = COPY %2
189 ; 32BIT-DAG: $r4 = COPY %1
190 ; 32BIT-DAG: $r5 = COPY %3
191 ; 32BIT-NEXT: BL_NOP &".___memmove[PR]", csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r2, implicit-def $r1, implicit-def $r3
192 ; 32BIT-NEXT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
193 ; 32BIT: ADJCALLSTACKDOWN 92, 0, implicit-def dead $r1, implicit $r1
194 ; 32BIT-DAG: $r3 = COPY %{{[0-9]+}}
195 ; 32BIT-DAG: $f1 = COPY %{{[0-9]+}}
196 ; 32BIT-DAG: $r5 = COPY %{{[0-9]+}}
197 ; 32BIT-DAG: $r6 = COPY %{{[0-9]+}}
198 ; 32BIT-DAG: $r7 = COPY %{{[0-9]+}}
199 ; 32BIT-DAG: $r8 = COPY %{{[0-9]+}}
200 ; 32BIT-DAG: $r9 = COPY %{{[0-9]+}}
201 ; 32BIT-DAG: $r10 = COPY %{{[0-9]+}}
202 ; 32BIT-NEXT: BL_NOP <mcsymbol .test_byval_mem3>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $f1, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1
203 ; 32BIT-NEXT: ADJCALLSTACKUP 92, 0, implicit-def dead $r1, implicit $r1
205 ; CHECKASM-LABEL: .call_test_byval_mem3:
207 ; ASM32BIT: stwu 1, -96(1)
208 ; ASM32BIT-DAG: lwz [[REG:[0-9]+]], L..C{{[0-9]+}}(2)
209 ; ASM32BIT-DAG: addi 3, 1, 56
210 ; ASM32BIT-DAG: addi 4, [[REG]], 24
211 ; ASM32BIT-DAG: li 5, 33
212 ; ASM32BIT-NEXT: bl .___memmove[PR]
213 ; ASM32BIT-DAG: lwz 5, 0([[REG]])
214 ; ASM32BIT-DAG: lwz 6, 4([[REG]])
215 ; ASM32BIT-DAG: lwz 7, 8([[REG]])
216 ; ASM32BIT-DAG: lwz 8, 12([[REG]])
217 ; ASM32BIT-DAG: lwz 9, 16([[REG]])
218 ; ASM32BIT-DAG: lwz 10, 20([[REG]])
219 ; ASM32BIT: bl .test_byval_mem3
220 ; ASM32BIT: addi 1, 1, 96
222 ; The memcpy call was inlined in 64-bit so MIR test is redundant and omitted.
223 ; ASM64BIT: stdu 1, -128(1)
224 ; ASM64BIT-DAG: ld [[REG1:[0-9]+]], L..C{{[0-9]+}}(2)
225 ; ASM64BIT-DAG: ld [[REG2:[0-9]+]], 48([[REG1]])
226 ; ASM64BIT-DAG: std [[REG2]], 112(1)
227 ; ASM64BIT-DAG: lbz [[REG3:[0-9]+]], 56([[REG1]])
228 ; ASM64BIT-DAG: stb [[REG3]], 120(1)
229 ; ASM64BIT-DAG: ld 5, 0([[REG1]])
230 ; ASM64BIT-DAG: ld 6, 8([[REG1]])
231 ; ASM64BIT-DAG: ld 7, 16([[REG1]])
232 ; ASM64BIT-DAG: ld 8, 24([[REG1]])
233 ; ASM64BIT-DAG: ld 9, 32([[REG1]])
234 ; ASM64BIT-DAG: ld 10, 40([[REG1]])
235 ; ASM64BIT: bl .test_byval_mem3
236 ; ASM64BIT: addi 1, 1, 128
238 define void @test_byval_mem3(i32, float, ptr byval(%struct_S57) align 1 %s) {
244 ;CHECK-LABEL: name: test_byval_mem3
247 ; 32BIT-NEXT: - { id: 0, type: default, offset: 32, size: 60, alignment: 16, stack-id: default,
250 ; 32BIT-NEXT: liveins: $r5, $r6, $r7, $r8, $r9, $r10
252 ; 32BIT-DAG: %2:gprc = COPY $r5
253 ; 32BIT-DAG: %3:gprc = COPY $r6
254 ; 32BIT-DAG: %4:gprc = COPY $r7
255 ; 32BIT-DAG: %5:gprc = COPY $r8
256 ; 32BIT-DAG: %6:gprc = COPY $r9
257 ; 32BIT-DAG: %7:gprc = COPY $r10
258 ; 32BIT-NEXT: STW %2, 0, %fixed-stack.0 :: (store (s32) into %fixed-stack.0
259 ; 32BIT-DAG: STW %3, 4, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 4
260 ; 32BIT-DAG: STW %4, 8, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 8
261 ; 32BIT-DAG: STW %5, 12, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 12
262 ; 32BIT-DAG: STW %6, 16, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 16
263 ; 32BIT-DAG: STW %7, 20, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 20
264 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm
267 ; 64BIT-NEXT: - { id: 0, type: default, offset: 64, size: 64, alignment: 16, stack-id: default,
270 ; 64BIT-NEXT: liveins: $x5, $x6, $x7, $x8, $x9, $x10
272 ; 64BIT-DAG: %2:g8rc = COPY $x5
273 ; 64BIT-DAG: %3:g8rc = COPY $x6
274 ; 64BIT-DAG: %4:g8rc = COPY $x7
275 ; 64BIT-DAG: %5:g8rc = COPY $x8
276 ; 64BIT-DAG: %6:g8rc = COPY $x9
277 ; 64BIT-DAG: %7:g8rc = COPY $x10
278 ; 64BIT-NEXT: STD %2, 0, %fixed-stack.0 :: (store (s64) into %fixed-stack.0, align 16)
279 ; 64BIT-DAG: STD %3, 8, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 8)
280 ; 64BIT-DAG: STD %4, 16, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 16, align 16)
281 ; 64BIT-DAG: STD %5, 24, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 24)
282 ; 64BIT-DAG: STD %6, 32, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 32, align 16)
283 ; 64BIT-DAG: STD %7, 40, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 40)
284 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm
286 %struct_S31 = type { [31 x i8] }
288 @gS31 = external global %struct_S31, align 1
290 define void @call_test_byval_mem4() {
292 call void @test_byval_mem4(i32 42, ptr byval(%struct_S31) align 1 @gS31, ptr byval(%struct_S256) align 1 @gS256)
297 ; CHECK-LABEL: name: call_test_byval_mem4
299 ; CHECKASM-LABEL: .call_test_byval_mem4:
301 ; Confirm the expected memcpy call is independent of the call to test_byval_mem4.
302 ; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
303 ; 32BIT-NEXT: %3:gprc = nuw ADDI $r1, 60
304 ; 32BIT-NEXT: %4:gprc = LWZtoc @gS256, $r2 :: (load (s32) from got)
305 ; 32BIT-NEXT: %5:gprc = LI 256
306 ; 32BIT-DAG: $r3 = COPY %3
307 ; 32BIT-DAG: $r4 = COPY %4
308 ; 32BIT-DAG: $r5 = COPY %5
309 ; 32BIT-NEXT: BL_NOP &".___memmove[PR]", csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r2, implicit-def $r1, implicit-def $r3
310 ; 32BIT-NEXT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
311 ; 32BIT: ADJCALLSTACKDOWN 316, 0, implicit-def dead $r1, implicit $r1
312 ; 32BIT-DAG: $r3 = COPY %{{[0-9]+}}
313 ; 32BIT-DAG: $r4 = COPY %{{[0-9]+}}
314 ; 32BIT-DAG: $r5 = COPY %{{[0-9]+}}
315 ; 32BIT-DAG: $r6 = COPY %{{[0-9]+}}
316 ; 32BIT-DAG: $r7 = COPY %{{[0-9]+}}
317 ; 32BIT-DAG: $r8 = COPY %{{[0-9]+}}
318 ; 32BIT-DAG: $r9 = COPY %{{[0-9]+}}
319 ; 32BIT-DAG: $r10 = COPY %{{[0-9]+}}
320 ; 32BIT-NEXT: BL_NOP <mcsymbol .test_byval_mem4>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1
321 ; 32BIT-NEXT: ADJCALLSTACKUP 316, 0, implicit-def dead $r1, implicit $r1
323 ; ASM32BIT: stwu 1, -320(1)
324 ; ASM32BIT-NEXT: stw 0, 328(1)
325 ; ASM32BIT-DAG: stw [[REG1:[0-9]+]], {{[0-9]+}}(1)
326 ; ASM32BIT-DAG: lwz [[REG1]], L..C{{[0-9]+}}(2)
327 ; ASM32BIT-DAG: lhz [[REG2:[0-9]+]], 28([[REG1]])
328 ; ASM32BIT-DAG: sth [[REG2]], 56(1)
329 ; ASM32BIT-DAG: lbz [[REG3:[0-9]+]], 30([[REG1]])
330 ; ASM32BIT-DAG: stb [[REG3]], 58(1)
331 ; ASM32BIT-DAG: addi 3, 1, 60
332 ; ASM32BIT-DAG: lwz 4, L..C{{[0-9]+}}(2)
333 ; ASM32BIT-DAG: li 5, 256
334 ; ASM32BIT-NEXT: bl .___memmove[PR]
335 ; ASM32BIT-DAG: lwz 4, 0([[REG1]])
336 ; ASM32BIT-DAG: lwz 5, 4([[REG1]])
337 ; ASM32BIT-DAG: lwz 6, 8([[REG1]])
338 ; ASM32BIT-DAG: lwz 7, 12([[REG1]])
339 ; ASM32BIT-DAG: lwz 8, 16([[REG1]])
340 ; ASM32BIT-DAG: lwz 9, 20([[REG1]])
341 ; ASM32BIT-DAG: lwz 10, 24([[REG1]])
342 ; ASM32BIT: bl .test_byval_mem4
343 ; ASM32BIT: addi 1, 1, 320
345 ; Confirm the expected memcpy call is independent of the call to test_byval_mem4.
346 ; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
347 ; 64BIT-NEXT: %0:g8rc_and_g8rc_nox0 = LDtoc @gS256, $x2 :: (load (s64) from got)
348 ; 64BIT-NEXT: %1:g8rc = nuw ADDI8 %0, 24
349 ; 64BIT-NEXT: %2:g8rc = nuw ADDI8 $x1, 112
350 ; 64BIT-NEXT: %3:g8rc = LI8 232
351 ; 64BIT-DAG: $x3 = COPY %2
352 ; 64BIT-DAG: $x4 = COPY %1
353 ; 64BIT-DAG: $x5 = COPY %3
354 ; 64BIT-NEXT: BL8_NOP &".___memmove64[PR]", csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x2, implicit-def $r1, implicit-def $x3
355 ; 64BIT-NEXT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
356 ; 64BIT: ADJCALLSTACKDOWN 344, 0, implicit-def dead $r1, implicit $r1
357 ; 64BIT-DAG: $x3 = COPY %{{[0-9]+}}
358 ; 64BIT-DAG: $x4 = COPY %{{[0-9]+}}
359 ; 64BIT-DAG: $x5 = COPY %{{[0-9]+}}
360 ; 64BIT-DAG: $x6 = COPY %{{[0-9]+}}
361 ; 64BIT-DAG: $x7 = COPY %{{[0-9]+}}
362 ; 64BIT-DAG: $x8 = COPY %{{[0-9]+}}
363 ; 64BIT-DAG: $x9 = COPY %{{[0-9]+}}
364 ; 64BIT-DAG: $x10 = COPY %{{[0-9]+}}
365 ; 64BIT-NEXT: BL8_NOP <mcsymbol .test_byval_mem4>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1
366 ; 64BIT-NEXT: ADJCALLSTACKUP 344, 0, implicit-def dead $r1, implicit $r1
368 ; ASM64BIT: stdu 1, -352(1)
369 ; ASM64BIT-DAG: ld [[REG1:[0-9]+]], L..C{{[0-9]+}}(2)
370 ; ASM64BIT-DAG: addi 3, 1, 112
371 ; ASM64BIT-DAG: addi 4, [[REG1]], 24
372 ; ASM64BIT-DAG: li 5, 232
373 ; ASM64BIT-NEXT: bl .___memmove64[PR]
374 ; ASM64BIT-DAG: ld [[REG2:[0-9]+]], L..C{{[0-9]+}}(2)
375 ; ASM64BIT-DAG: ld 4, 0([[REG2]])
376 ; ASM64BIT-DAG: ld 5, 8([[REG2]])
377 ; ASM64BIT-DAG: ld 6, 16([[REG2]])
378 ; ASM64BIT-DAG: lwz [[REG3:[0-9]+]], 24([[REG2]])
379 ; ASM64BIT-DAG: lhz [[REG4:[0-9]+]], 28([[REG2]])
380 ; ASM64BIT-DAG: lbz 7, 30([[REG2]])
381 ; ASM64BIT-DAG: rlwinm 7, 7, 8, 16, 23
382 ; ASM64BIT-DAG: rlwimi 7, [[REG4]], 16, 0, 15
383 ; ASM64BIT-DAG: rldimi 7, [[REG3]], 32, 0
384 ; ASM64BIT-DAG: ld 8, 0([[REG1]])
385 ; ASM64BIT-DAG: ld 9, 8([[REG1]])
386 ; ASM64BIT-DAG: ld 10, 16([[REG1]])
387 ; ASM64BIT: bl .test_byval_mem4
388 ; ASM64BIT: addi 1, 1, 352
390 define void @test_byval_mem4(i32, ptr byval(%struct_S31) align 1, ptr byval(%struct_S256) align 1 %s) {
395 ; CHECK-LABEL: name: test_byval_mem4
398 ; 32BIT: - { id: 0, type: default, offset: 60, size: 256, alignment: 4, stack-id: default,
399 ; 32BIT: - { id: 1, type: default, offset: 28, size: 32, alignment: 4, stack-id: default,
403 ; 32BIT-NEXT: liveins: $r4, $r5, $r6, $r7, $r8, $r9, $r10
405 ; 32BIT-DAG: %1:gprc = COPY $r4
406 ; 32BIT-DAG: %2:gprc = COPY $r5
407 ; 32BIT-DAG: %3:gprc = COPY $r6
408 ; 32BIT-DAG: %4:gprc = COPY $r7
409 ; 32BIT-DAG: %5:gprc = COPY $r8
410 ; 32BIT-DAG: %6:gprc = COPY $r9
411 ; 32BIT-DAG: %7:gprc = COPY $r10
412 ; 32BIT-NEXT: STW %1, 0, %fixed-stack.1 :: (store (s32) into %fixed-stack.1
413 ; 32BIT-DAG: STW %2, 4, %fixed-stack.1 :: (store (s32) into %fixed-stack.1 + 4
414 ; 32BIT-DAG: STW %3, 8, %fixed-stack.1 :: (store (s32) into %fixed-stack.1 + 8
415 ; 32BIT-DAG: STW %4, 12, %fixed-stack.1 :: (store (s32) into %fixed-stack.1 + 12
416 ; 32BIT-DAG: STW %5, 16, %fixed-stack.1 :: (store (s32) into %fixed-stack.1 + 16
417 ; 32BIT-DAG: STW %6, 20, %fixed-stack.1 :: (store (s32) into %fixed-stack.1 + 20
418 ; 32BIT-DAG: STW %7, 24, %fixed-stack.1 :: (store (s32) into %fixed-stack.1 + 24
419 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm
422 ; 64BIT: - { id: 0, type: default, offset: 88, size: 256, alignment: 8, stack-id: default,
423 ; 64BIT: - { id: 1, type: default, offset: 56, size: 32, alignment: 8, stack-id: default,
427 ; 64BIT-NEXT: liveins: $x4, $x5, $x6, $x7, $x8, $x9, $x10
429 ; 64BIT-DAG: %1:g8rc = COPY $x4
430 ; 64BIT-DAG: %2:g8rc = COPY $x5
431 ; 64BIT-DAG: %3:g8rc = COPY $x6
432 ; 64BIT-DAG: %4:g8rc = COPY $x7
433 ; 64BIT-DAG: %5:g8rc = COPY $x8
434 ; 64BIT-DAG: %6:g8rc = COPY $x9
435 ; 64BIT-DAG: %7:g8rc = COPY $x10
436 ; 64BIT-NEXT: STD %1, 0, %fixed-stack.1 :: (store (s64) into %fixed-stack.1
437 ; 64BIT-DAG: STD %2, 8, %fixed-stack.1 :: (store (s64) into %fixed-stack.1 + 8
438 ; 64BIT-DAG: STD %3, 16, %fixed-stack.1 :: (store (s64) into %fixed-stack.1 + 16
439 ; 64BIT-DAG: STD %4, 24, %fixed-stack.1 :: (store (s64) into %fixed-stack.1 + 24
440 ; 64BIT-DAG: STD %5, 0, %fixed-stack.0 :: (store (s64) into %fixed-stack.0
441 ; 64BIT-DAG: STD %6, 8, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 8
442 ; 64BIT-DAG: STD %7, 16, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 16
443 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm