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<void (%struct.S1*)* @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<void (%struct.S1*)* @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<void (%struct.S1*)* @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 4
155 call void @f2(%struct.S1* byval align 4 %a)
159 declare dso_local void @f2(%struct.S1* byval 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<void (%struct.S1*)* @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<void (%struct.S1*)* @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<void (%struct.S1*)* @f2>
192 ; N64-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<{{.*}}>
194 define dso_local void @g2(%struct.S1* %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: sll $1, $5, 0
259 ; N32-NEXT: lui $2, 1
260 ; N32-NEXT: addu $2, $sp, $2
261 ; N32-NEXT: sw $1, -4($2)
262 ; N32-NEXT: addiu $16, $sp, 8
263 ; N32-NEXT: ori $6, $zero, 65520
264 ; N32-NEXT: jal memcpy
265 ; N32-NEXT: move $4, $16
266 ; N32-NEXT: addiu $5, $16, 64
267 ; N32-NEXT: ori $1, $zero, 65456
268 ; N32-NEXT: subu $sp, $sp, $1
269 ; N32-NEXT: ori $6, $zero, 65456
270 ; N32-NEXT: jal memcpy
271 ; N32-NEXT: move $4, $sp
272 ; N32-NEXT: ld $11, 64($sp)
273 ; N32-NEXT: ld $10, 56($sp)
274 ; N32-NEXT: ld $9, 48($sp)
275 ; N32-NEXT: ld $8, 40($sp)
276 ; N32-NEXT: ld $7, 32($sp)
277 ; N32-NEXT: ld $6, 24($sp)
278 ; N32-NEXT: ld $5, 16($sp)
280 ; N32-NEXT: ld $4, 8($sp)
281 ; N32-NEXT: ori $1, $zero, 65456
282 ; N32-NEXT: addu $sp, $sp, $1
283 ; N32-NEXT: lui $1, 1
284 ; N32-NEXT: addu $1, $sp, $1
285 ; N32-NEXT: ld $16, 0($1) # 8-byte Folded Reload
286 ; N32-NEXT: lui $1, 1
287 ; N32-NEXT: addu $1, $sp, $1
288 ; N32-NEXT: ld $ra, 8($1) # 8-byte Folded Reload
289 ; N32-NEXT: lui $1, 1
290 ; N32-NEXT: addiu $1, $1, 16
292 ; N32-NEXT: addu $sp, $sp, $1
295 ; N64: # %bb.0: # %entry
296 ; N64-NEXT: lui $1, 1
297 ; N64-NEXT: daddiu $1, $1, 16
298 ; N64-NEXT: dsubu $sp, $sp, $1
299 ; N64-NEXT: .cfi_def_cfa_offset 65552
300 ; N64-NEXT: lui $1, 1
301 ; N64-NEXT: daddu $1, $sp, $1
302 ; N64-NEXT: sd $ra, 8($1) # 8-byte Folded Spill
303 ; N64-NEXT: lui $1, 1
304 ; N64-NEXT: daddu $1, $sp, $1
305 ; N64-NEXT: sd $16, 0($1) # 8-byte Folded Spill
306 ; N64-NEXT: .cfi_offset 31, -8
307 ; N64-NEXT: .cfi_offset 16, -16
308 ; N64-NEXT: move $5, $4
309 ; N64-NEXT: lui $1, 1
310 ; N64-NEXT: daddu $1, $sp, $1
311 ; N64-NEXT: sd $4, -8($1)
312 ; N64-NEXT: daddiu $16, $sp, 8
313 ; N64-NEXT: ori $6, $zero, 65520
314 ; N64-NEXT: jal memcpy
315 ; N64-NEXT: move $4, $16
316 ; N64-NEXT: ori $1, $zero, 65456
317 ; N64-NEXT: dsubu $sp, $sp, $1
318 ; N64-NEXT: daddiu $5, $16, 64
319 ; N64-NEXT: ori $6, $zero, 65456
320 ; N64-NEXT: jal memcpy
321 ; N64-NEXT: move $4, $sp
322 ; N64-NEXT: ld $11, 64($sp)
323 ; N64-NEXT: ld $10, 56($sp)
324 ; N64-NEXT: ld $9, 48($sp)
325 ; N64-NEXT: ld $8, 40($sp)
326 ; N64-NEXT: ld $7, 32($sp)
327 ; N64-NEXT: ld $6, 24($sp)
328 ; N64-NEXT: ld $5, 16($sp)
330 ; N64-NEXT: ld $4, 8($sp)
331 ; N64-NEXT: ori $1, $zero, 65456
332 ; N64-NEXT: daddu $sp, $sp, $1
333 ; N64-NEXT: lui $1, 1
334 ; N64-NEXT: daddu $1, $sp, $1
335 ; N64-NEXT: ld $16, 0($1) # 8-byte Folded Reload
336 ; N64-NEXT: lui $1, 1
337 ; N64-NEXT: daddu $1, $sp, $1
338 ; N64-NEXT: ld $ra, 8($1) # 8-byte Folded Reload
339 ; N64-NEXT: lui $1, 1
340 ; N64-NEXT: daddiu $1, $1, 16
342 ; N64-NEXT: daddu $sp, $sp, $1
344 %a.addr = alloca %struct.S1*, align 4
345 %byval-temp = alloca %struct.S1, align 4
346 store %struct.S1* %a, %struct.S1** %a.addr, align 4
347 %0 = load %struct.S1*, %struct.S1** %a.addr, align 4
348 %1 = bitcast %struct.S1* %byval-temp to i8*
349 %2 = bitcast %struct.S1* %0 to i8*
350 call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %1, i8* align 1 %2, i32 65520, i1 false)
351 call void @f2(%struct.S1* byval align 4 %byval-temp)
355 ; O32-SDAG-LABEL: Initial selection DAG: %bb.0 'g3:entry'
356 ; O32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<16>
357 ; O32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
358 ; O32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<16>
360 ; N32-SDAG-LABEL: Initial selection DAG: %bb.0 'g3:entry'
361 ; N32-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i32<0>
362 ; N32-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i32'memcpy'
363 ; N32-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i32<0>
365 ; N64-SDAG-LABEL: Initial selection DAG: %bb.0 'g3:entry'
366 ; N64-SDAG: t{{.*}}: ch,glue = callseq_start t{{.*}}, TargetConstant:i64<0>
367 ; N64-SDAG: t{{.*}}: ch,glue = MipsISD::JmpLink t{{.*}}, TargetExternalSymbol:i64'memcpy'
368 ; N64-SDAG: t{{.*}}: ch,glue = callseq_end t{{.*}}, TargetConstant:i64<0>
370 define dso_local i32 @g3(%struct.S1* %a, %struct.S1* %b) #0 {
372 ; O32: # %bb.0: # %entry
373 ; O32-NEXT: addiu $sp, $sp, -32
374 ; O32-NEXT: .cfi_def_cfa_offset 32
375 ; O32-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill
376 ; O32-NEXT: .cfi_offset 31, -4
377 ; O32-NEXT: sw $5, 20($sp)
378 ; O32-NEXT: sw $4, 24($sp)
379 ; O32-NEXT: jal memcpy
380 ; O32-NEXT: ori $6, $zero, 65520
381 ; O32-NEXT: addiu $2, $zero, 4
382 ; O32-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload
384 ; O32-NEXT: addiu $sp, $sp, 32
387 ; N32: # %bb.0: # %entry
388 ; N32-NEXT: addiu $sp, $sp, -16
389 ; N32-NEXT: .cfi_def_cfa_offset 16
390 ; N32-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill
391 ; N32-NEXT: .cfi_offset 31, -8
392 ; N32-NEXT: sll $1, $5, 0
393 ; N32-NEXT: sw $1, 0($sp)
394 ; N32-NEXT: sll $1, $4, 0
395 ; N32-NEXT: sw $1, 4($sp)
396 ; N32-NEXT: jal memcpy
397 ; N32-NEXT: ori $6, $zero, 65520
398 ; N32-NEXT: addiu $2, $zero, 4
399 ; N32-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload
401 ; N32-NEXT: addiu $sp, $sp, 16
404 ; N64: # %bb.0: # %entry
405 ; N64-NEXT: daddiu $sp, $sp, -32
406 ; N64-NEXT: .cfi_def_cfa_offset 32
407 ; N64-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill
408 ; N64-NEXT: .cfi_offset 31, -8
409 ; N64-NEXT: sd $5, 8($sp)
410 ; N64-NEXT: sd $4, 16($sp)
411 ; N64-NEXT: jal memcpy
412 ; N64-NEXT: ori $6, $zero, 65520
413 ; N64-NEXT: addiu $2, $zero, 4
414 ; N64-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload
416 ; N64-NEXT: daddiu $sp, $sp, 32
418 %a.addr = alloca %struct.S1*, align 4
419 %b.addr = alloca %struct.S1*, align 4
420 store %struct.S1* %a, %struct.S1** %a.addr, align 4
421 store %struct.S1* %b, %struct.S1** %b.addr, align 4
422 %0 = load %struct.S1*, %struct.S1** %a.addr, align 4
423 %1 = bitcast %struct.S1* %0 to i8*
424 %2 = load %struct.S1*, %struct.S1** %b.addr, align 4
425 %3 = bitcast %struct.S1* %2 to i8*
426 call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %1, i8* align 1 %3, i32 65520, i1 false)
430 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) #2