1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; NOTE: The SelectionDAG checks have been added by hand.
4 ; RUN: llc < %s -mtriple=mips-linux-gnu -verify-machineinstrs \
5 ; RUN: | FileCheck %s --check-prefix=O32
6 ; RUN: llc < %s -mtriple=mips64-linux-gnu -target-abi n32 -verify-machineinstrs \
7 ; RUN: | FileCheck %s --check-prefix=N32
8 ; RUN: llc < %s -mtriple=mips64-linux-gnu -target-abi n64 -verify-machineinstrs \
9 ; RUN: | FileCheck %s --check-prefix=N64
11 ; RUN: llc < %s -mtriple=mips-linux-gnu -verify-machineinstrs -debug 2>&1 \
12 ; RUN: | FileCheck %s --check-prefix=O32-SDAG
13 ; RUN: llc < %s -mtriple=mips64-linux-gnu -target-abi n32 -verify-machineinstrs \
14 ; RUN: -debug 2>&1 | FileCheck %s --check-prefix=N32-SDAG
15 ; RUN: llc < %s -mtriple=mips64-linux-gnu -target-abi n64 -verify-machineinstrs \
16 ; RUN: -debug 2>&1 | FileCheck %s --check-prefix=N64-SDAG
20 ; Test that reserved argument area is shared between the memcpy call and the
21 ; call to f2. This eliminates the nested call sequence nodes.
23 ; Also, test that a basic call to memcpy reserves its outgoing argument area.
25 ; FIXME: We should also be explicit about testing that the loads for the
26 ; arguments are scheduled after the memcpy, but that wasn't enforced in
29 %struct.S1 = type { [65520 x i8] }
31 ; O32-SDAG-LABEL: Initial selection DAG: %bb.0 'g:entry'
32 ; O32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
33 ; O32-SDAG-NOT: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
34 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
35 ; O32-SDAG-NOT: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
36 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetGlobalAddress:i32<ptr @f2>
37 ; O32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
39 ; N32-SDAG-LABEL: Initial selection DAG: %bb.0 'g:entry'
40 ; N32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
41 ; N32-SDAG-NOT: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
42 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
43 ; N32-SDAG-NOT: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
44 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetGlobalAddress:i32<ptr @f2>
45 ; N32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
47 ; N64-SDAG-LABEL: Initial selection DAG: %bb.0 'g:entry'
48 ; N64-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<{{.*}}>
49 ; N64-SDAG-NOT: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<{{.*}}>
50 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i64'memcpy'
51 ; N64-SDAG-NOT: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<{{.*}}>
52 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetGlobalAddress:i64<ptr @f2>
53 ; N64-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<{{.*}}>
55 define dso_local void @g() #0 {
57 ; O32: # %bb.0: # %entry
59 ; O32-NEXT: subu $sp, $sp, $1
60 ; O32-NEXT: .cfi_def_cfa_offset 65536
62 ; O32-NEXT: addu $1, $sp, $1
63 ; O32-NEXT: sw $ra, -4($1) # 4-byte Folded Spill
64 ; O32-NEXT: .cfi_offset 31, -4
65 ; O32-NEXT: ori $1, $zero, 65520
66 ; O32-NEXT: subu $sp, $sp, $1
67 ; O32-NEXT: addiu $1, $sp, 8
68 ; O32-NEXT: addiu $5, $1, 16
69 ; O32-NEXT: addiu $4, $sp, 16
70 ; O32-NEXT: jal memcpy
71 ; O32-NEXT: ori $6, $zero, 65504
72 ; O32-NEXT: lw $7, 20($sp)
73 ; O32-NEXT: lw $6, 16($sp)
74 ; O32-NEXT: lw $5, 12($sp)
76 ; O32-NEXT: lw $4, 8($sp)
77 ; O32-NEXT: ori $1, $zero, 65520
78 ; O32-NEXT: addu $sp, $sp, $1
80 ; O32-NEXT: addu $1, $sp, $1
81 ; O32-NEXT: lw $ra, -4($1) # 4-byte Folded Reload
84 ; O32-NEXT: addu $sp, $sp, $1
87 ; N32: # %bb.0: # %entry
89 ; N32-NEXT: subu $sp, $sp, $1
90 ; N32-NEXT: .cfi_def_cfa_offset 65536
92 ; N32-NEXT: addu $1, $sp, $1
93 ; N32-NEXT: sd $ra, -8($1) # 8-byte Folded Spill
94 ; N32-NEXT: .cfi_offset 31, -8
95 ; N32-NEXT: ori $1, $zero, 65456
96 ; N32-NEXT: subu $sp, $sp, $1
97 ; N32-NEXT: addiu $1, $sp, 8
98 ; N32-NEXT: addiu $5, $1, 64
99 ; N32-NEXT: ori $6, $zero, 65456
100 ; N32-NEXT: jal memcpy
101 ; N32-NEXT: move $4, $sp
102 ; N32-NEXT: ld $11, 64($sp)
103 ; N32-NEXT: ld $10, 56($sp)
104 ; N32-NEXT: ld $9, 48($sp)
105 ; N32-NEXT: ld $8, 40($sp)
106 ; N32-NEXT: ld $7, 32($sp)
107 ; N32-NEXT: ld $6, 24($sp)
108 ; N32-NEXT: ld $5, 16($sp)
110 ; N32-NEXT: ld $4, 8($sp)
111 ; N32-NEXT: ori $1, $zero, 65456
112 ; N32-NEXT: addu $sp, $sp, $1
113 ; N32-NEXT: lui $1, 1
114 ; N32-NEXT: addu $1, $sp, $1
115 ; N32-NEXT: ld $ra, -8($1) # 8-byte Folded Reload
116 ; N32-NEXT: lui $1, 1
118 ; N32-NEXT: addu $sp, $sp, $1
121 ; N64: # %bb.0: # %entry
122 ; N64-NEXT: lui $1, 1
123 ; N64-NEXT: dsubu $sp, $sp, $1
124 ; N64-NEXT: .cfi_def_cfa_offset 65536
125 ; N64-NEXT: lui $1, 1
126 ; N64-NEXT: daddu $1, $sp, $1
127 ; N64-NEXT: sd $ra, -8($1) # 8-byte Folded Spill
128 ; N64-NEXT: .cfi_offset 31, -8
129 ; N64-NEXT: ori $1, $zero, 65456
130 ; N64-NEXT: dsubu $sp, $sp, $1
131 ; N64-NEXT: daddiu $1, $sp, 8
132 ; N64-NEXT: daddiu $5, $1, 64
133 ; N64-NEXT: ori $6, $zero, 65456
134 ; N64-NEXT: jal memcpy
135 ; N64-NEXT: move $4, $sp
136 ; N64-NEXT: ld $11, 64($sp)
137 ; N64-NEXT: ld $10, 56($sp)
138 ; N64-NEXT: ld $9, 48($sp)
139 ; N64-NEXT: ld $8, 40($sp)
140 ; N64-NEXT: ld $7, 32($sp)
141 ; N64-NEXT: ld $6, 24($sp)
142 ; N64-NEXT: ld $5, 16($sp)
144 ; N64-NEXT: ld $4, 8($sp)
145 ; N64-NEXT: ori $1, $zero, 65456
146 ; N64-NEXT: daddu $sp, $sp, $1
147 ; N64-NEXT: lui $1, 1
148 ; N64-NEXT: daddu $1, $sp, $1
149 ; N64-NEXT: ld $ra, -8($1) # 8-byte Folded Reload
150 ; N64-NEXT: lui $1, 1
152 ; N64-NEXT: daddu $sp, $sp, $1
154 %a = alloca %struct.S1, align 8
155 call void @f2(ptr byval(%struct.S1) align 4 %a)
159 declare dso_local void @f2(ptr byval(%struct.S1) align 4) #1
161 ; O32-SDAG-LABEL: Initial selection DAG: %bb.0 'g2:entry'
162 ; O32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
163 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
164 ; O32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
165 ; O32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
166 ; O32-SDAG-NOT: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
167 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
168 ; O32-SDAG-NOT: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
169 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetGlobalAddress:i32<ptr @f2>
170 ; O32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
172 ; N32-SDAG-LABEL: Initial selection DAG: %bb.0 'g2:entry'
173 ; N32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
174 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
175 ; N32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
176 ; N32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
177 ; N32-SDAG-NOT: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<{{.*}}>
178 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
179 ; N32-SDAG-NOT: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
180 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetGlobalAddress:i32<ptr @f2>
181 ; N32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<{{.*}}>
183 ; N64-SDAG-LABEL: Initial selection DAG: %bb.0 'g2:entry'
184 ; N64-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<{{.*}}>
185 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i64'memcpy'
186 ; N64-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<{{.*}}>
187 ; N64-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<{{.*}}>
188 ; N64-SDAG-NOT: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<{{.*}}>
189 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i64'memcpy'
190 ; N64-SDAG-NOT: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<{{.*}}>
191 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetGlobalAddress:i64<ptr @f2>
192 ; N64-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<{{.*}}>
194 define dso_local void @g2(ptr %a) {
196 ; O32: # %bb.0: # %entry
197 ; O32-NEXT: lui $1, 1
198 ; O32-NEXT: addiu $1, $1, 8
199 ; O32-NEXT: subu $sp, $sp, $1
200 ; O32-NEXT: .cfi_def_cfa_offset 65544
201 ; O32-NEXT: lui $1, 1
202 ; O32-NEXT: addu $1, $sp, $1
203 ; O32-NEXT: sw $ra, 4($1) # 4-byte Folded Spill
204 ; O32-NEXT: lui $1, 1
205 ; O32-NEXT: addu $1, $sp, $1
206 ; O32-NEXT: sw $16, 0($1) # 4-byte Folded Spill
207 ; O32-NEXT: .cfi_offset 31, -4
208 ; O32-NEXT: .cfi_offset 16, -8
209 ; O32-NEXT: move $5, $4
210 ; O32-NEXT: lui $1, 1
211 ; O32-NEXT: addu $1, $sp, $1
212 ; O32-NEXT: sw $4, -4($1)
213 ; O32-NEXT: addiu $sp, $sp, -16
214 ; O32-NEXT: addiu $16, $sp, 8
215 ; O32-NEXT: ori $6, $zero, 65520
216 ; O32-NEXT: jal memcpy
217 ; O32-NEXT: move $4, $16
218 ; O32-NEXT: addiu $sp, $sp, 16
219 ; O32-NEXT: ori $1, $zero, 65520
220 ; O32-NEXT: subu $sp, $sp, $1
221 ; O32-NEXT: addiu $5, $16, 16
222 ; O32-NEXT: addiu $4, $sp, 16
223 ; O32-NEXT: jal memcpy
224 ; O32-NEXT: ori $6, $zero, 65504
225 ; O32-NEXT: lw $7, 20($sp)
226 ; O32-NEXT: lw $6, 16($sp)
227 ; O32-NEXT: lw $5, 12($sp)
229 ; O32-NEXT: lw $4, 8($sp)
230 ; O32-NEXT: ori $1, $zero, 65520
231 ; O32-NEXT: addu $sp, $sp, $1
232 ; O32-NEXT: lui $1, 1
233 ; O32-NEXT: addu $1, $sp, $1
234 ; O32-NEXT: lw $16, 0($1) # 4-byte Folded Reload
235 ; O32-NEXT: lui $1, 1
236 ; O32-NEXT: addu $1, $sp, $1
237 ; O32-NEXT: lw $ra, 4($1) # 4-byte Folded Reload
238 ; O32-NEXT: lui $1, 1
239 ; O32-NEXT: addiu $1, $1, 8
241 ; O32-NEXT: addu $sp, $sp, $1
244 ; N32: # %bb.0: # %entry
245 ; N32-NEXT: lui $1, 1
246 ; N32-NEXT: addiu $1, $1, 16
247 ; N32-NEXT: subu $sp, $sp, $1
248 ; N32-NEXT: .cfi_def_cfa_offset 65552
249 ; N32-NEXT: lui $1, 1
250 ; N32-NEXT: addu $1, $sp, $1
251 ; N32-NEXT: sd $ra, 8($1) # 8-byte Folded Spill
252 ; N32-NEXT: lui $1, 1
253 ; N32-NEXT: addu $1, $sp, $1
254 ; N32-NEXT: sd $16, 0($1) # 8-byte Folded Spill
255 ; N32-NEXT: .cfi_offset 31, -8
256 ; N32-NEXT: .cfi_offset 16, -16
257 ; N32-NEXT: move $5, $4
258 ; N32-NEXT: lui $1, 1
259 ; N32-NEXT: addu $1, $sp, $1
260 ; N32-NEXT: sw $4, -4($1)
261 ; N32-NEXT: addiu $16, $sp, 8
262 ; N32-NEXT: ori $6, $zero, 65520
263 ; N32-NEXT: jal memcpy
264 ; N32-NEXT: move $4, $16
265 ; N32-NEXT: addiu $5, $16, 64
266 ; N32-NEXT: ori $1, $zero, 65456
267 ; N32-NEXT: subu $sp, $sp, $1
268 ; N32-NEXT: ori $6, $zero, 65456
269 ; N32-NEXT: jal memcpy
270 ; N32-NEXT: move $4, $sp
271 ; N32-NEXT: ld $11, 64($sp)
272 ; N32-NEXT: ld $10, 56($sp)
273 ; N32-NEXT: ld $9, 48($sp)
274 ; N32-NEXT: ld $8, 40($sp)
275 ; N32-NEXT: ld $7, 32($sp)
276 ; N32-NEXT: ld $6, 24($sp)
277 ; N32-NEXT: ld $5, 16($sp)
279 ; N32-NEXT: ld $4, 8($sp)
280 ; N32-NEXT: ori $1, $zero, 65456
281 ; N32-NEXT: addu $sp, $sp, $1
282 ; N32-NEXT: lui $1, 1
283 ; N32-NEXT: addu $1, $sp, $1
284 ; N32-NEXT: ld $16, 0($1) # 8-byte Folded Reload
285 ; N32-NEXT: lui $1, 1
286 ; N32-NEXT: addu $1, $sp, $1
287 ; N32-NEXT: ld $ra, 8($1) # 8-byte Folded Reload
288 ; N32-NEXT: lui $1, 1
289 ; N32-NEXT: addiu $1, $1, 16
291 ; N32-NEXT: addu $sp, $sp, $1
294 ; N64: # %bb.0: # %entry
295 ; N64-NEXT: lui $1, 1
296 ; N64-NEXT: daddiu $1, $1, 16
297 ; N64-NEXT: dsubu $sp, $sp, $1
298 ; N64-NEXT: .cfi_def_cfa_offset 65552
299 ; N64-NEXT: lui $1, 1
300 ; N64-NEXT: daddu $1, $sp, $1
301 ; N64-NEXT: sd $ra, 8($1) # 8-byte Folded Spill
302 ; N64-NEXT: lui $1, 1
303 ; N64-NEXT: daddu $1, $sp, $1
304 ; N64-NEXT: sd $16, 0($1) # 8-byte Folded Spill
305 ; N64-NEXT: .cfi_offset 31, -8
306 ; N64-NEXT: .cfi_offset 16, -16
307 ; N64-NEXT: move $5, $4
308 ; N64-NEXT: lui $1, 1
309 ; N64-NEXT: daddu $1, $sp, $1
310 ; N64-NEXT: sd $4, -8($1)
311 ; N64-NEXT: daddiu $16, $sp, 8
312 ; N64-NEXT: ori $6, $zero, 65520
313 ; N64-NEXT: jal memcpy
314 ; N64-NEXT: move $4, $16
315 ; N64-NEXT: ori $1, $zero, 65456
316 ; N64-NEXT: dsubu $sp, $sp, $1
317 ; N64-NEXT: daddiu $5, $16, 64
318 ; N64-NEXT: ori $6, $zero, 65456
319 ; N64-NEXT: jal memcpy
320 ; N64-NEXT: move $4, $sp
321 ; N64-NEXT: ld $11, 64($sp)
322 ; N64-NEXT: ld $10, 56($sp)
323 ; N64-NEXT: ld $9, 48($sp)
324 ; N64-NEXT: ld $8, 40($sp)
325 ; N64-NEXT: ld $7, 32($sp)
326 ; N64-NEXT: ld $6, 24($sp)
327 ; N64-NEXT: ld $5, 16($sp)
329 ; N64-NEXT: ld $4, 8($sp)
330 ; N64-NEXT: ori $1, $zero, 65456
331 ; N64-NEXT: daddu $sp, $sp, $1
332 ; N64-NEXT: lui $1, 1
333 ; N64-NEXT: daddu $1, $sp, $1
334 ; N64-NEXT: ld $16, 0($1) # 8-byte Folded Reload
335 ; N64-NEXT: lui $1, 1
336 ; N64-NEXT: daddu $1, $sp, $1
337 ; N64-NEXT: ld $ra, 8($1) # 8-byte Folded Reload
338 ; N64-NEXT: lui $1, 1
339 ; N64-NEXT: daddiu $1, $1, 16
341 ; N64-NEXT: daddu $sp, $sp, $1
344 %byval-temp = alloca %struct.S1, align 8
345 store ptr %a, ptr %a.addr, align 4
346 %0 = load ptr, ptr %a.addr, align 4
347 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %byval-temp, ptr align 1 %0, i32 65520, i1 false)
348 call void @f2(ptr byval(%struct.S1) align 4 %byval-temp)
352 ; O32-SDAG-LABEL: Initial selection DAG: %bb.0 'g3:entry'
353 ; O32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<16>
354 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
355 ; O32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<16>
357 ; N32-SDAG-LABEL: Initial selection DAG: %bb.0 'g3:entry'
358 ; N32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<0>
359 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
360 ; N32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<0>
362 ; N64-SDAG-LABEL: Initial selection DAG: %bb.0 'g3:entry'
363 ; N64-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<0>
364 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i64'memcpy'
365 ; N64-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<0>
367 define dso_local i32 @g3(ptr %a, ptr %b) #0 {
369 ; O32: # %bb.0: # %entry
370 ; O32-NEXT: addiu $sp, $sp, -32
371 ; O32-NEXT: .cfi_def_cfa_offset 32
372 ; O32-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill
373 ; O32-NEXT: .cfi_offset 31, -4
374 ; O32-NEXT: sw $5, 20($sp)
375 ; O32-NEXT: sw $4, 24($sp)
376 ; O32-NEXT: jal memcpy
377 ; O32-NEXT: ori $6, $zero, 65520
378 ; O32-NEXT: addiu $2, $zero, 4
379 ; O32-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload
381 ; O32-NEXT: addiu $sp, $sp, 32
384 ; N32: # %bb.0: # %entry
385 ; N32-NEXT: addiu $sp, $sp, -16
386 ; N32-NEXT: .cfi_def_cfa_offset 16
387 ; N32-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill
388 ; N32-NEXT: .cfi_offset 31, -8
389 ; N32-NEXT: sw $5, 0($sp)
390 ; N32-NEXT: sw $4, 4($sp)
391 ; N32-NEXT: jal memcpy
392 ; N32-NEXT: ori $6, $zero, 65520
393 ; N32-NEXT: addiu $2, $zero, 4
394 ; N32-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload
396 ; N32-NEXT: addiu $sp, $sp, 16
399 ; N64: # %bb.0: # %entry
400 ; N64-NEXT: daddiu $sp, $sp, -32
401 ; N64-NEXT: .cfi_def_cfa_offset 32
402 ; N64-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill
403 ; N64-NEXT: .cfi_offset 31, -8
404 ; N64-NEXT: sd $5, 8($sp)
405 ; N64-NEXT: sd $4, 16($sp)
406 ; N64-NEXT: jal memcpy
407 ; N64-NEXT: ori $6, $zero, 65520
408 ; N64-NEXT: addiu $2, $zero, 4
409 ; N64-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload
411 ; N64-NEXT: daddiu $sp, $sp, 32
415 store ptr %a, ptr %a.addr, align 4
416 store ptr %b, ptr %b.addr, align 4
417 %0 = load ptr, ptr %a.addr, align 4
418 %1 = load ptr, ptr %b.addr, align 4
419 call void @llvm.memcpy.p0.p0.i32(ptr align 1 %0, ptr align 1 %1, i32 65520, i1 false)
423 declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1) #2