1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-linux | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-linux -mcpu=core2 | FileCheck %s --check-prefix=CORE2
4 ; RUN: llc < %s -mtriple=x86_64-unknown-linux -mcpu=nehalem | FileCheck %s --check-prefix=NEHALEM
5 ; RUN: llc < %s -mtriple=x86_64-unknown-linux -mcpu=sandybridge | FileCheck %s --check-prefix=SANDYBRIDGE
6 ; RUN: llc < %s -mtriple=x86_64-unknown-linux -mcpu=skylake | FileCheck %s --check-prefix=SKYLAKE
7 ; RUN: llc < %s -mtriple=x86_64-unknown-linux -mcpu=knl | FileCheck %s --check-prefix=KNL
10 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) nounwind
12 define void @memset_0(i8* %a) nounwind {
13 ; X86-LABEL: memset_0:
14 ; X86: # %bb.0: # %entry
17 ; CORE2-LABEL: memset_0:
18 ; CORE2: # %bb.0: # %entry
21 ; NEHALEM-LABEL: memset_0:
22 ; NEHALEM: # %bb.0: # %entry
25 ; SANDYBRIDGE-LABEL: memset_0:
26 ; SANDYBRIDGE: # %bb.0: # %entry
27 ; SANDYBRIDGE-NEXT: retq
29 ; SKYLAKE-LABEL: memset_0:
30 ; SKYLAKE: # %bb.0: # %entry
33 ; KNL-LABEL: memset_0:
34 ; KNL: # %bb.0: # %entry
37 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 0, i1 false)
41 define void @memset_4(i8* %a) nounwind {
42 ; X86-LABEL: memset_4:
43 ; X86: # %bb.0: # %entry
44 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
45 ; X86-NEXT: movl $0, (%eax)
48 ; CORE2-LABEL: memset_4:
49 ; CORE2: # %bb.0: # %entry
50 ; CORE2-NEXT: movl $0, (%rdi)
53 ; NEHALEM-LABEL: memset_4:
54 ; NEHALEM: # %bb.0: # %entry
55 ; NEHALEM-NEXT: movl $0, (%rdi)
58 ; SANDYBRIDGE-LABEL: memset_4:
59 ; SANDYBRIDGE: # %bb.0: # %entry
60 ; SANDYBRIDGE-NEXT: movl $0, (%rdi)
61 ; SANDYBRIDGE-NEXT: retq
63 ; SKYLAKE-LABEL: memset_4:
64 ; SKYLAKE: # %bb.0: # %entry
65 ; SKYLAKE-NEXT: movl $0, (%rdi)
68 ; KNL-LABEL: memset_4:
69 ; KNL: # %bb.0: # %entry
70 ; KNL-NEXT: movl $0, (%rdi)
73 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 4, i1 false)
77 define void @memset_5(i8* %a) nounwind {
78 ; X86-LABEL: memset_5:
79 ; X86: # %bb.0: # %entry
80 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
81 ; X86-NEXT: movb $0, 4(%eax)
82 ; X86-NEXT: movl $0, (%eax)
85 ; CORE2-LABEL: memset_5:
86 ; CORE2: # %bb.0: # %entry
87 ; CORE2-NEXT: movb $0, 4(%rdi)
88 ; CORE2-NEXT: movl $0, (%rdi)
91 ; NEHALEM-LABEL: memset_5:
92 ; NEHALEM: # %bb.0: # %entry
93 ; NEHALEM-NEXT: movb $0, 4(%rdi)
94 ; NEHALEM-NEXT: movl $0, (%rdi)
97 ; SANDYBRIDGE-LABEL: memset_5:
98 ; SANDYBRIDGE: # %bb.0: # %entry
99 ; SANDYBRIDGE-NEXT: movb $0, 4(%rdi)
100 ; SANDYBRIDGE-NEXT: movl $0, (%rdi)
101 ; SANDYBRIDGE-NEXT: retq
103 ; SKYLAKE-LABEL: memset_5:
104 ; SKYLAKE: # %bb.0: # %entry
105 ; SKYLAKE-NEXT: movb $0, 4(%rdi)
106 ; SKYLAKE-NEXT: movl $0, (%rdi)
109 ; KNL-LABEL: memset_5:
110 ; KNL: # %bb.0: # %entry
111 ; KNL-NEXT: movb $0, 4(%rdi)
112 ; KNL-NEXT: movl $0, (%rdi)
115 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 5, i1 false)
119 define void @memset_7(i8* %a) nounwind {
120 ; X86-LABEL: memset_7:
121 ; X86: # %bb.0: # %entry
122 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
123 ; X86-NEXT: movl $0, 3(%eax)
124 ; X86-NEXT: movl $0, (%eax)
127 ; CORE2-LABEL: memset_7:
128 ; CORE2: # %bb.0: # %entry
129 ; CORE2-NEXT: movl $0, 3(%rdi)
130 ; CORE2-NEXT: movl $0, (%rdi)
133 ; NEHALEM-LABEL: memset_7:
134 ; NEHALEM: # %bb.0: # %entry
135 ; NEHALEM-NEXT: movl $0, 3(%rdi)
136 ; NEHALEM-NEXT: movl $0, (%rdi)
139 ; SANDYBRIDGE-LABEL: memset_7:
140 ; SANDYBRIDGE: # %bb.0: # %entry
141 ; SANDYBRIDGE-NEXT: movl $0, 3(%rdi)
142 ; SANDYBRIDGE-NEXT: movl $0, (%rdi)
143 ; SANDYBRIDGE-NEXT: retq
145 ; SKYLAKE-LABEL: memset_7:
146 ; SKYLAKE: # %bb.0: # %entry
147 ; SKYLAKE-NEXT: movl $0, 3(%rdi)
148 ; SKYLAKE-NEXT: movl $0, (%rdi)
151 ; KNL-LABEL: memset_7:
152 ; KNL: # %bb.0: # %entry
153 ; KNL-NEXT: movl $0, 3(%rdi)
154 ; KNL-NEXT: movl $0, (%rdi)
157 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 7, i1 false)
161 define void @memset_8(i8* %a) nounwind {
162 ; X86-LABEL: memset_8:
163 ; X86: # %bb.0: # %entry
164 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
165 ; X86-NEXT: movl $0, 4(%eax)
166 ; X86-NEXT: movl $0, (%eax)
169 ; CORE2-LABEL: memset_8:
170 ; CORE2: # %bb.0: # %entry
171 ; CORE2-NEXT: movq $0, (%rdi)
174 ; NEHALEM-LABEL: memset_8:
175 ; NEHALEM: # %bb.0: # %entry
176 ; NEHALEM-NEXT: movq $0, (%rdi)
179 ; SANDYBRIDGE-LABEL: memset_8:
180 ; SANDYBRIDGE: # %bb.0: # %entry
181 ; SANDYBRIDGE-NEXT: movq $0, (%rdi)
182 ; SANDYBRIDGE-NEXT: retq
184 ; SKYLAKE-LABEL: memset_8:
185 ; SKYLAKE: # %bb.0: # %entry
186 ; SKYLAKE-NEXT: movq $0, (%rdi)
189 ; KNL-LABEL: memset_8:
190 ; KNL: # %bb.0: # %entry
191 ; KNL-NEXT: movq $0, (%rdi)
194 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 8, i1 false)
198 define void @memset_11(i8* %a) nounwind {
199 ; X86-LABEL: memset_11:
200 ; X86: # %bb.0: # %entry
201 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
202 ; X86-NEXT: movl $0, 7(%eax)
203 ; X86-NEXT: movl $0, 4(%eax)
204 ; X86-NEXT: movl $0, (%eax)
207 ; CORE2-LABEL: memset_11:
208 ; CORE2: # %bb.0: # %entry
209 ; CORE2-NEXT: movl $0, 7(%rdi)
210 ; CORE2-NEXT: movq $0, (%rdi)
213 ; NEHALEM-LABEL: memset_11:
214 ; NEHALEM: # %bb.0: # %entry
215 ; NEHALEM-NEXT: movl $0, 7(%rdi)
216 ; NEHALEM-NEXT: movq $0, (%rdi)
219 ; SANDYBRIDGE-LABEL: memset_11:
220 ; SANDYBRIDGE: # %bb.0: # %entry
221 ; SANDYBRIDGE-NEXT: movl $0, 7(%rdi)
222 ; SANDYBRIDGE-NEXT: movq $0, (%rdi)
223 ; SANDYBRIDGE-NEXT: retq
225 ; SKYLAKE-LABEL: memset_11:
226 ; SKYLAKE: # %bb.0: # %entry
227 ; SKYLAKE-NEXT: movl $0, 7(%rdi)
228 ; SKYLAKE-NEXT: movq $0, (%rdi)
231 ; KNL-LABEL: memset_11:
232 ; KNL: # %bb.0: # %entry
233 ; KNL-NEXT: movl $0, 7(%rdi)
234 ; KNL-NEXT: movq $0, (%rdi)
237 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 11, i1 false)
241 define void @memset_13(i8* %a) nounwind {
242 ; X86-LABEL: memset_13:
243 ; X86: # %bb.0: # %entry
244 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
245 ; X86-NEXT: movb $0, 12(%eax)
246 ; X86-NEXT: movl $0, 8(%eax)
247 ; X86-NEXT: movl $0, 4(%eax)
248 ; X86-NEXT: movl $0, (%eax)
251 ; CORE2-LABEL: memset_13:
252 ; CORE2: # %bb.0: # %entry
253 ; CORE2-NEXT: movq $0, 5(%rdi)
254 ; CORE2-NEXT: movq $0, (%rdi)
257 ; NEHALEM-LABEL: memset_13:
258 ; NEHALEM: # %bb.0: # %entry
259 ; NEHALEM-NEXT: movq $0, 5(%rdi)
260 ; NEHALEM-NEXT: movq $0, (%rdi)
263 ; SANDYBRIDGE-LABEL: memset_13:
264 ; SANDYBRIDGE: # %bb.0: # %entry
265 ; SANDYBRIDGE-NEXT: movq $0, 5(%rdi)
266 ; SANDYBRIDGE-NEXT: movq $0, (%rdi)
267 ; SANDYBRIDGE-NEXT: retq
269 ; SKYLAKE-LABEL: memset_13:
270 ; SKYLAKE: # %bb.0: # %entry
271 ; SKYLAKE-NEXT: movq $0, 5(%rdi)
272 ; SKYLAKE-NEXT: movq $0, (%rdi)
275 ; KNL-LABEL: memset_13:
276 ; KNL: # %bb.0: # %entry
277 ; KNL-NEXT: movq $0, 5(%rdi)
278 ; KNL-NEXT: movq $0, (%rdi)
281 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 13, i1 false)
285 define void @memset_15(i8* %a) nounwind {
286 ; X86-LABEL: memset_15:
287 ; X86: # %bb.0: # %entry
288 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
289 ; X86-NEXT: movl $0, 11(%eax)
290 ; X86-NEXT: movl $0, 8(%eax)
291 ; X86-NEXT: movl $0, 4(%eax)
292 ; X86-NEXT: movl $0, (%eax)
295 ; CORE2-LABEL: memset_15:
296 ; CORE2: # %bb.0: # %entry
297 ; CORE2-NEXT: movq $0, 7(%rdi)
298 ; CORE2-NEXT: movq $0, (%rdi)
301 ; NEHALEM-LABEL: memset_15:
302 ; NEHALEM: # %bb.0: # %entry
303 ; NEHALEM-NEXT: movq $0, 7(%rdi)
304 ; NEHALEM-NEXT: movq $0, (%rdi)
307 ; SANDYBRIDGE-LABEL: memset_15:
308 ; SANDYBRIDGE: # %bb.0: # %entry
309 ; SANDYBRIDGE-NEXT: movq $0, 7(%rdi)
310 ; SANDYBRIDGE-NEXT: movq $0, (%rdi)
311 ; SANDYBRIDGE-NEXT: retq
313 ; SKYLAKE-LABEL: memset_15:
314 ; SKYLAKE: # %bb.0: # %entry
315 ; SKYLAKE-NEXT: movq $0, 7(%rdi)
316 ; SKYLAKE-NEXT: movq $0, (%rdi)
319 ; KNL-LABEL: memset_15:
320 ; KNL: # %bb.0: # %entry
321 ; KNL-NEXT: movq $0, 7(%rdi)
322 ; KNL-NEXT: movq $0, (%rdi)
325 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 15, i1 false)
329 define void @memset_16(i8* %a) nounwind {
330 ; X86-LABEL: memset_16:
331 ; X86: # %bb.0: # %entry
332 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
333 ; X86-NEXT: movl $0, 12(%eax)
334 ; X86-NEXT: movl $0, 8(%eax)
335 ; X86-NEXT: movl $0, 4(%eax)
336 ; X86-NEXT: movl $0, (%eax)
339 ; CORE2-LABEL: memset_16:
340 ; CORE2: # %bb.0: # %entry
341 ; CORE2-NEXT: movq $0, 8(%rdi)
342 ; CORE2-NEXT: movq $0, (%rdi)
345 ; NEHALEM-LABEL: memset_16:
346 ; NEHALEM: # %bb.0: # %entry
347 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
348 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
351 ; SANDYBRIDGE-LABEL: memset_16:
352 ; SANDYBRIDGE: # %bb.0: # %entry
353 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
354 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
355 ; SANDYBRIDGE-NEXT: retq
357 ; SKYLAKE-LABEL: memset_16:
358 ; SKYLAKE: # %bb.0: # %entry
359 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
360 ; SKYLAKE-NEXT: vmovups %xmm0, (%rdi)
363 ; KNL-LABEL: memset_16:
364 ; KNL: # %bb.0: # %entry
365 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
366 ; KNL-NEXT: vmovups %xmm0, (%rdi)
369 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 16, i1 false)
373 define void @memset_17(i8* %a) nounwind {
374 ; X86-LABEL: memset_17:
375 ; X86: # %bb.0: # %entry
376 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
377 ; X86-NEXT: movb $0, 16(%eax)
378 ; X86-NEXT: movl $0, 12(%eax)
379 ; X86-NEXT: movl $0, 8(%eax)
380 ; X86-NEXT: movl $0, 4(%eax)
381 ; X86-NEXT: movl $0, (%eax)
384 ; CORE2-LABEL: memset_17:
385 ; CORE2: # %bb.0: # %entry
386 ; CORE2-NEXT: movb $0, 16(%rdi)
387 ; CORE2-NEXT: movq $0, 8(%rdi)
388 ; CORE2-NEXT: movq $0, (%rdi)
391 ; NEHALEM-LABEL: memset_17:
392 ; NEHALEM: # %bb.0: # %entry
393 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
394 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
395 ; NEHALEM-NEXT: movb $0, 16(%rdi)
398 ; SANDYBRIDGE-LABEL: memset_17:
399 ; SANDYBRIDGE: # %bb.0: # %entry
400 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
401 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
402 ; SANDYBRIDGE-NEXT: movb $0, 16(%rdi)
403 ; SANDYBRIDGE-NEXT: retq
405 ; SKYLAKE-LABEL: memset_17:
406 ; SKYLAKE: # %bb.0: # %entry
407 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
408 ; SKYLAKE-NEXT: vmovups %xmm0, (%rdi)
409 ; SKYLAKE-NEXT: movb $0, 16(%rdi)
412 ; KNL-LABEL: memset_17:
413 ; KNL: # %bb.0: # %entry
414 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
415 ; KNL-NEXT: vmovups %xmm0, (%rdi)
416 ; KNL-NEXT: movb $0, 16(%rdi)
419 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 17, i1 false)
423 define void @memset_19(i8* %a) nounwind {
424 ; X86-LABEL: memset_19:
425 ; X86: # %bb.0: # %entry
426 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
427 ; X86-NEXT: movl $0, 15(%eax)
428 ; X86-NEXT: movl $0, 12(%eax)
429 ; X86-NEXT: movl $0, 8(%eax)
430 ; X86-NEXT: movl $0, 4(%eax)
431 ; X86-NEXT: movl $0, (%eax)
434 ; CORE2-LABEL: memset_19:
435 ; CORE2: # %bb.0: # %entry
436 ; CORE2-NEXT: movl $0, 15(%rdi)
437 ; CORE2-NEXT: movq $0, 8(%rdi)
438 ; CORE2-NEXT: movq $0, (%rdi)
441 ; NEHALEM-LABEL: memset_19:
442 ; NEHALEM: # %bb.0: # %entry
443 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
444 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
445 ; NEHALEM-NEXT: movl $0, 15(%rdi)
448 ; SANDYBRIDGE-LABEL: memset_19:
449 ; SANDYBRIDGE: # %bb.0: # %entry
450 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
451 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
452 ; SANDYBRIDGE-NEXT: movl $0, 15(%rdi)
453 ; SANDYBRIDGE-NEXT: retq
455 ; SKYLAKE-LABEL: memset_19:
456 ; SKYLAKE: # %bb.0: # %entry
457 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
458 ; SKYLAKE-NEXT: vmovups %xmm0, (%rdi)
459 ; SKYLAKE-NEXT: movl $0, 15(%rdi)
462 ; KNL-LABEL: memset_19:
463 ; KNL: # %bb.0: # %entry
464 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
465 ; KNL-NEXT: vmovups %xmm0, (%rdi)
466 ; KNL-NEXT: movl $0, 15(%rdi)
469 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 19, i1 false)
473 define void @memset_31(i8* %a) nounwind {
474 ; X86-LABEL: memset_31:
475 ; X86: # %bb.0: # %entry
476 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
477 ; X86-NEXT: movl $0, 27(%eax)
478 ; X86-NEXT: movl $0, 24(%eax)
479 ; X86-NEXT: movl $0, 20(%eax)
480 ; X86-NEXT: movl $0, 16(%eax)
481 ; X86-NEXT: movl $0, 12(%eax)
482 ; X86-NEXT: movl $0, 8(%eax)
483 ; X86-NEXT: movl $0, 4(%eax)
484 ; X86-NEXT: movl $0, (%eax)
487 ; CORE2-LABEL: memset_31:
488 ; CORE2: # %bb.0: # %entry
489 ; CORE2-NEXT: movq $0, 23(%rdi)
490 ; CORE2-NEXT: movq $0, 16(%rdi)
491 ; CORE2-NEXT: movq $0, 8(%rdi)
492 ; CORE2-NEXT: movq $0, (%rdi)
495 ; NEHALEM-LABEL: memset_31:
496 ; NEHALEM: # %bb.0: # %entry
497 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
498 ; NEHALEM-NEXT: movups %xmm0, 15(%rdi)
499 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
502 ; SANDYBRIDGE-LABEL: memset_31:
503 ; SANDYBRIDGE: # %bb.0: # %entry
504 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
505 ; SANDYBRIDGE-NEXT: vmovups %xmm0, 15(%rdi)
506 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
507 ; SANDYBRIDGE-NEXT: retq
509 ; SKYLAKE-LABEL: memset_31:
510 ; SKYLAKE: # %bb.0: # %entry
511 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
512 ; SKYLAKE-NEXT: vmovups %xmm0, 15(%rdi)
513 ; SKYLAKE-NEXT: vmovups %xmm0, (%rdi)
516 ; KNL-LABEL: memset_31:
517 ; KNL: # %bb.0: # %entry
518 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
519 ; KNL-NEXT: vmovups %xmm0, 15(%rdi)
520 ; KNL-NEXT: vmovups %xmm0, (%rdi)
523 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 31, i1 false)
527 define void @memset_32(i8* %a) nounwind {
528 ; X86-LABEL: memset_32:
529 ; X86: # %bb.0: # %entry
530 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
531 ; X86-NEXT: movl $0, 28(%eax)
532 ; X86-NEXT: movl $0, 24(%eax)
533 ; X86-NEXT: movl $0, 20(%eax)
534 ; X86-NEXT: movl $0, 16(%eax)
535 ; X86-NEXT: movl $0, 12(%eax)
536 ; X86-NEXT: movl $0, 8(%eax)
537 ; X86-NEXT: movl $0, 4(%eax)
538 ; X86-NEXT: movl $0, (%eax)
541 ; CORE2-LABEL: memset_32:
542 ; CORE2: # %bb.0: # %entry
543 ; CORE2-NEXT: movq $0, 24(%rdi)
544 ; CORE2-NEXT: movq $0, 16(%rdi)
545 ; CORE2-NEXT: movq $0, 8(%rdi)
546 ; CORE2-NEXT: movq $0, (%rdi)
549 ; NEHALEM-LABEL: memset_32:
550 ; NEHALEM: # %bb.0: # %entry
551 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
552 ; NEHALEM-NEXT: movups %xmm0, 16(%rdi)
553 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
556 ; SANDYBRIDGE-LABEL: memset_32:
557 ; SANDYBRIDGE: # %bb.0: # %entry
558 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
559 ; SANDYBRIDGE-NEXT: vmovups %xmm0, 16(%rdi)
560 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
561 ; SANDYBRIDGE-NEXT: retq
563 ; SKYLAKE-LABEL: memset_32:
564 ; SKYLAKE: # %bb.0: # %entry
565 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
566 ; SKYLAKE-NEXT: vmovups %ymm0, (%rdi)
567 ; SKYLAKE-NEXT: vzeroupper
570 ; KNL-LABEL: memset_32:
571 ; KNL: # %bb.0: # %entry
572 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
573 ; KNL-NEXT: vmovups %ymm0, (%rdi)
576 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 32, i1 false)
580 define void @memset_32_align32(i8* %a) nounwind {
581 ; X86-LABEL: memset_32_align32:
582 ; X86: # %bb.0: # %entry
583 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
584 ; X86-NEXT: movl $0, 28(%eax)
585 ; X86-NEXT: movl $0, 24(%eax)
586 ; X86-NEXT: movl $0, 20(%eax)
587 ; X86-NEXT: movl $0, 16(%eax)
588 ; X86-NEXT: movl $0, 12(%eax)
589 ; X86-NEXT: movl $0, 8(%eax)
590 ; X86-NEXT: movl $0, 4(%eax)
591 ; X86-NEXT: movl $0, (%eax)
594 ; CORE2-LABEL: memset_32_align32:
595 ; CORE2: # %bb.0: # %entry
596 ; CORE2-NEXT: xorps %xmm0, %xmm0
597 ; CORE2-NEXT: movaps %xmm0, 16(%rdi)
598 ; CORE2-NEXT: movaps %xmm0, (%rdi)
601 ; NEHALEM-LABEL: memset_32_align32:
602 ; NEHALEM: # %bb.0: # %entry
603 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
604 ; NEHALEM-NEXT: movaps %xmm0, 16(%rdi)
605 ; NEHALEM-NEXT: movaps %xmm0, (%rdi)
608 ; SANDYBRIDGE-LABEL: memset_32_align32:
609 ; SANDYBRIDGE: # %bb.0: # %entry
610 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
611 ; SANDYBRIDGE-NEXT: vmovaps %ymm0, (%rdi)
612 ; SANDYBRIDGE-NEXT: vzeroupper
613 ; SANDYBRIDGE-NEXT: retq
615 ; SKYLAKE-LABEL: memset_32_align32:
616 ; SKYLAKE: # %bb.0: # %entry
617 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
618 ; SKYLAKE-NEXT: vmovaps %ymm0, (%rdi)
619 ; SKYLAKE-NEXT: vzeroupper
622 ; KNL-LABEL: memset_32_align32:
623 ; KNL: # %bb.0: # %entry
624 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
625 ; KNL-NEXT: vmovaps %ymm0, (%rdi)
628 call void @llvm.memset.p0i8.i64(i8* align 32 %a, i8 0, i64 32, i1 false)
633 define void @memset_35(i8* %a) nounwind {
634 ; X86-LABEL: memset_35:
635 ; X86: # %bb.0: # %entry
636 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
637 ; X86-NEXT: movl $0, 31(%eax)
638 ; X86-NEXT: movl $0, 28(%eax)
639 ; X86-NEXT: movl $0, 24(%eax)
640 ; X86-NEXT: movl $0, 20(%eax)
641 ; X86-NEXT: movl $0, 16(%eax)
642 ; X86-NEXT: movl $0, 12(%eax)
643 ; X86-NEXT: movl $0, 8(%eax)
644 ; X86-NEXT: movl $0, 4(%eax)
645 ; X86-NEXT: movl $0, (%eax)
648 ; CORE2-LABEL: memset_35:
649 ; CORE2: # %bb.0: # %entry
650 ; CORE2-NEXT: movl $0, 31(%rdi)
651 ; CORE2-NEXT: movq $0, 24(%rdi)
652 ; CORE2-NEXT: movq $0, 16(%rdi)
653 ; CORE2-NEXT: movq $0, 8(%rdi)
654 ; CORE2-NEXT: movq $0, (%rdi)
657 ; NEHALEM-LABEL: memset_35:
658 ; NEHALEM: # %bb.0: # %entry
659 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
660 ; NEHALEM-NEXT: movups %xmm0, 16(%rdi)
661 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
662 ; NEHALEM-NEXT: movl $0, 31(%rdi)
665 ; SANDYBRIDGE-LABEL: memset_35:
666 ; SANDYBRIDGE: # %bb.0: # %entry
667 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
668 ; SANDYBRIDGE-NEXT: vmovups %xmm0, 16(%rdi)
669 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
670 ; SANDYBRIDGE-NEXT: movl $0, 31(%rdi)
671 ; SANDYBRIDGE-NEXT: retq
673 ; SKYLAKE-LABEL: memset_35:
674 ; SKYLAKE: # %bb.0: # %entry
675 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
676 ; SKYLAKE-NEXT: vmovups %ymm0, (%rdi)
677 ; SKYLAKE-NEXT: movl $0, 31(%rdi)
678 ; SKYLAKE-NEXT: vzeroupper
681 ; KNL-LABEL: memset_35:
682 ; KNL: # %bb.0: # %entry
683 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
684 ; KNL-NEXT: vmovups %ymm0, (%rdi)
685 ; KNL-NEXT: movl $0, 31(%rdi)
688 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 35, i1 false)
692 define void @memset_64(i8* %a) nounwind {
693 ; X86-LABEL: memset_64:
694 ; X86: # %bb.0: # %entry
695 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
696 ; X86-NEXT: movl $0, 60(%eax)
697 ; X86-NEXT: movl $0, 56(%eax)
698 ; X86-NEXT: movl $0, 52(%eax)
699 ; X86-NEXT: movl $0, 48(%eax)
700 ; X86-NEXT: movl $0, 44(%eax)
701 ; X86-NEXT: movl $0, 40(%eax)
702 ; X86-NEXT: movl $0, 36(%eax)
703 ; X86-NEXT: movl $0, 32(%eax)
704 ; X86-NEXT: movl $0, 28(%eax)
705 ; X86-NEXT: movl $0, 24(%eax)
706 ; X86-NEXT: movl $0, 20(%eax)
707 ; X86-NEXT: movl $0, 16(%eax)
708 ; X86-NEXT: movl $0, 12(%eax)
709 ; X86-NEXT: movl $0, 8(%eax)
710 ; X86-NEXT: movl $0, 4(%eax)
711 ; X86-NEXT: movl $0, (%eax)
714 ; CORE2-LABEL: memset_64:
715 ; CORE2: # %bb.0: # %entry
716 ; CORE2-NEXT: movq $0, 56(%rdi)
717 ; CORE2-NEXT: movq $0, 48(%rdi)
718 ; CORE2-NEXT: movq $0, 40(%rdi)
719 ; CORE2-NEXT: movq $0, 32(%rdi)
720 ; CORE2-NEXT: movq $0, 24(%rdi)
721 ; CORE2-NEXT: movq $0, 16(%rdi)
722 ; CORE2-NEXT: movq $0, 8(%rdi)
723 ; CORE2-NEXT: movq $0, (%rdi)
726 ; NEHALEM-LABEL: memset_64:
727 ; NEHALEM: # %bb.0: # %entry
728 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
729 ; NEHALEM-NEXT: movups %xmm0, 48(%rdi)
730 ; NEHALEM-NEXT: movups %xmm0, 32(%rdi)
731 ; NEHALEM-NEXT: movups %xmm0, 16(%rdi)
732 ; NEHALEM-NEXT: movups %xmm0, (%rdi)
735 ; SANDYBRIDGE-LABEL: memset_64:
736 ; SANDYBRIDGE: # %bb.0: # %entry
737 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
738 ; SANDYBRIDGE-NEXT: vmovups %xmm0, 16(%rdi)
739 ; SANDYBRIDGE-NEXT: vmovups %xmm0, (%rdi)
740 ; SANDYBRIDGE-NEXT: vmovups %xmm0, 48(%rdi)
741 ; SANDYBRIDGE-NEXT: vmovups %xmm0, 32(%rdi)
742 ; SANDYBRIDGE-NEXT: retq
744 ; SKYLAKE-LABEL: memset_64:
745 ; SKYLAKE: # %bb.0: # %entry
746 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
747 ; SKYLAKE-NEXT: vmovups %ymm0, 32(%rdi)
748 ; SKYLAKE-NEXT: vmovups %ymm0, (%rdi)
749 ; SKYLAKE-NEXT: vzeroupper
752 ; KNL-LABEL: memset_64:
753 ; KNL: # %bb.0: # %entry
754 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
755 ; KNL-NEXT: vmovups %zmm0, (%rdi)
758 call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 64, i1 false)
762 define void @memset_64_align64(i8* %a) nounwind {
763 ; X86-LABEL: memset_64_align64:
764 ; X86: # %bb.0: # %entry
765 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
766 ; X86-NEXT: movl $0, 60(%eax)
767 ; X86-NEXT: movl $0, 56(%eax)
768 ; X86-NEXT: movl $0, 52(%eax)
769 ; X86-NEXT: movl $0, 48(%eax)
770 ; X86-NEXT: movl $0, 44(%eax)
771 ; X86-NEXT: movl $0, 40(%eax)
772 ; X86-NEXT: movl $0, 36(%eax)
773 ; X86-NEXT: movl $0, 32(%eax)
774 ; X86-NEXT: movl $0, 28(%eax)
775 ; X86-NEXT: movl $0, 24(%eax)
776 ; X86-NEXT: movl $0, 20(%eax)
777 ; X86-NEXT: movl $0, 16(%eax)
778 ; X86-NEXT: movl $0, 12(%eax)
779 ; X86-NEXT: movl $0, 8(%eax)
780 ; X86-NEXT: movl $0, 4(%eax)
781 ; X86-NEXT: movl $0, (%eax)
784 ; CORE2-LABEL: memset_64_align64:
785 ; CORE2: # %bb.0: # %entry
786 ; CORE2-NEXT: xorps %xmm0, %xmm0
787 ; CORE2-NEXT: movaps %xmm0, 48(%rdi)
788 ; CORE2-NEXT: movaps %xmm0, 32(%rdi)
789 ; CORE2-NEXT: movaps %xmm0, 16(%rdi)
790 ; CORE2-NEXT: movaps %xmm0, (%rdi)
793 ; NEHALEM-LABEL: memset_64_align64:
794 ; NEHALEM: # %bb.0: # %entry
795 ; NEHALEM-NEXT: xorps %xmm0, %xmm0
796 ; NEHALEM-NEXT: movaps %xmm0, 48(%rdi)
797 ; NEHALEM-NEXT: movaps %xmm0, 32(%rdi)
798 ; NEHALEM-NEXT: movaps %xmm0, 16(%rdi)
799 ; NEHALEM-NEXT: movaps %xmm0, (%rdi)
802 ; SANDYBRIDGE-LABEL: memset_64_align64:
803 ; SANDYBRIDGE: # %bb.0: # %entry
804 ; SANDYBRIDGE-NEXT: vxorps %xmm0, %xmm0, %xmm0
805 ; SANDYBRIDGE-NEXT: vmovaps %ymm0, 32(%rdi)
806 ; SANDYBRIDGE-NEXT: vmovaps %ymm0, (%rdi)
807 ; SANDYBRIDGE-NEXT: vzeroupper
808 ; SANDYBRIDGE-NEXT: retq
810 ; SKYLAKE-LABEL: memset_64_align64:
811 ; SKYLAKE: # %bb.0: # %entry
812 ; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0
813 ; SKYLAKE-NEXT: vmovaps %ymm0, 32(%rdi)
814 ; SKYLAKE-NEXT: vmovaps %ymm0, (%rdi)
815 ; SKYLAKE-NEXT: vzeroupper
818 ; KNL-LABEL: memset_64_align64:
819 ; KNL: # %bb.0: # %entry
820 ; KNL-NEXT: vxorps %xmm0, %xmm0, %xmm0
821 ; KNL-NEXT: vmovaps %zmm0, (%rdi)
824 call void @llvm.memset.p0i8.i64(i8* align 64 %a, i8 0, i64 64, i1 false)