Lines Matching +full:0 +full:x64
6 … -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefixes=X64,X64-SSE,X64-SSE2
7 …-mtriple=x86_64-unknown-unknown -mattr=sse4.1 | FileCheck %s --check-prefixes=X64,X64-SSE,X64-SSE41
8 … -mtriple=x86_64-unknown-unknown -mattr=avx | FileCheck %s --check-prefixes=X64,X64-AVX,X64-AVX1
9 … -mtriple=x86_64-unknown-unknown -mattr=avx2 | FileCheck %s --check-prefixes=X64,X64-AVX,X64-AVX2
10 …nknown-unknown -mattr=avx512bw,+prefer-256-bit | FileCheck %s --check-prefixes=X64,X64-AVX,X64-AVX2
11 …-mattr=avx512bw,-prefer-256-bit | FileCheck %s --check-prefixes=X64,X64-AVX,X64-AVX512,X64-AVX512BW
12 …avx512f,+prefer-256-bit,-prefer-mask-registers | FileCheck %s --check-prefixes=X64,X64-AVX,X64-AVX2
13 …r-256-bit,-prefer-mask-registers | FileCheck %s --check-prefixes=X64,X64-AVX,X64-AVX512,X64-AVX512F
14 …+prefer-256-bit,+prefer-mask-registers | FileCheck %s --check-prefixes=X64,X64-MIC-AVX,X64-MIC-AVX2
15 …efer-256-bit,+prefer-mask-registers | FileCheck %s --check-prefixes=X64,X64-MIC-AVX,X64-MIC-AVX512F
26 ; X86: # %bb.0:
30 ; X64-LABEL: length0:
31 ; X64: # %bb.0:
32 ; X64-NEXT: xorl %eax, %eax
33 ; X64-NEXT: retq
34 %m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 0) nounwind
40 ; X86: # %bb.0:
44 ; X64-LABEL: length0_eq:
45 ; X64: # %bb.0:
46 ; X64-NEXT: movb $1, %al
47 ; X64-NEXT: retq
48 %m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 0) nounwind
49 %c = icmp eq i32 %m, 0
55 ; X86: # %bb.0:
59 ; X64-LABEL: length0_lt:
60 ; X64: # %bb.0:
61 ; X64-NEXT: xorl %eax, %eax
62 ; X64-NEXT: retq
63 %m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 0) nounwind
64 %c = icmp slt i32 %m, 0
70 ; X86: # %bb.0:
71 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
72 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
82 ; X64-LABEL: length2:
83 ; X64: # %bb.0:
84 ; X64-NEXT: movzwl (%rdi), %eax
85 ; X64-NEXT: movzwl (%rsi), %ecx
86 ; X64-NEXT: rolw $8, %ax
87 ; X64-NEXT: rolw $8, %cx
88 ; X64-NEXT: movzwl %ax, %eax
89 ; X64-NEXT: movzwl %cx, %ecx
90 ; X64-NEXT: subl %ecx, %eax
91 ; X64-NEXT: retq
98 ; X86: # %bb.0:
99 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
103 ; X86-NEXT: addl $-12594, %eax # imm = 0xCECE
106 ; X64-LABEL: length2_const:
107 ; X64: # %bb.0:
108 ; X64-NEXT: movzwl (%rdi), %eax
109 ; X64-NEXT: rolw $8, %ax
110 ; X64-NEXT: movzwl %ax, %eax
111 ; X64-NEXT: addl $-12594, %eax # imm = 0xCECE
112 ; X64-NEXT: retq
113 …mcmp(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 1), i64 2) noun…
119 ; X86: # %bb.0:
120 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
124 ; X86-NEXT: addl $-12594, %eax # imm = 0xCECE
129 ; X64-LABEL: length2_gt_const:
130 ; X64: # %bb.0:
131 ; X64-NEXT: movzwl (%rdi), %eax
132 ; X64-NEXT: rolw $8, %ax
133 ; X64-NEXT: movzwl %ax, %eax
134 ; X64-NEXT: addl $-12594, %eax # imm = 0xCECE
135 ; X64-NEXT: testl %eax, %eax
136 ; X64-NEXT: setg %al
137 ; X64-NEXT: retq
138 …mcmp(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 1), i64 2) noun…
139 %c = icmp sgt i32 %m, 0
145 ; X86: # %bb.0:
146 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
147 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
153 ; X64-LABEL: length2_eq:
154 ; X64: # %bb.0:
155 ; X64-NEXT: movzwl (%rdi), %eax
156 ; X64-NEXT: cmpw (%rsi), %ax
157 ; X64-NEXT: sete %al
158 ; X64-NEXT: retq
160 %c = icmp eq i32 %m, 0
166 ; X86: # %bb.0:
167 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
168 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
180 ; X64-LABEL: length2_lt:
181 ; X64: # %bb.0:
182 ; X64-NEXT: movzwl (%rdi), %eax
183 ; X64-NEXT: movzwl (%rsi), %ecx
184 ; X64-NEXT: rolw $8, %ax
185 ; X64-NEXT: rolw $8, %cx
186 ; X64-NEXT: movzwl %ax, %eax
187 ; X64-NEXT: movzwl %cx, %ecx
188 ; X64-NEXT: subl %ecx, %eax
189 ; X64-NEXT: shrl $31, %eax
190 ; X64-NEXT: # kill: def $al killed $al killed $eax
191 ; X64-NEXT: retq
193 %c = icmp slt i32 %m, 0
199 ; X86: # %bb.0:
200 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
201 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
213 ; X64-LABEL: length2_gt:
214 ; X64: # %bb.0:
215 ; X64-NEXT: movzwl (%rdi), %eax
216 ; X64-NEXT: movzwl (%rsi), %ecx
217 ; X64-NEXT: rolw $8, %ax
218 ; X64-NEXT: rolw $8, %cx
219 ; X64-NEXT: movzwl %ax, %eax
220 ; X64-NEXT: movzwl %cx, %ecx
221 ; X64-NEXT: subl %ecx, %eax
222 ; X64-NEXT: testl %eax, %eax
223 ; X64-NEXT: setg %al
224 ; X64-NEXT: retq
226 %c = icmp sgt i32 %m, 0
232 ; X86: # %bb.0:
233 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
235 ; X86-NEXT: cmpl $12849, %eax # imm = 0x3231
239 ; X64-LABEL: length2_eq_const:
240 ; X64: # %bb.0:
241 ; X64-NEXT: movzwl (%rdi), %eax
242 ; X64-NEXT: cmpl $12849, %eax # imm = 0x3231
243 ; X64-NEXT: setne %al
244 ; X64-NEXT: retq
245 …mcmp(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 1), i64 2) noun…
246 %c = icmp ne i32 %m, 0
252 ; X86: # %bb.0:
253 ; X86-NEXT: pushl $0
255 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
256 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
263 ; X64-LABEL: length2_eq_nobuiltin_attr:
264 ; X64: # %bb.0:
265 ; X64-NEXT: pushq %rax
266 ; X64-NEXT: movl $2, %edx
267 ; X64-NEXT: callq memcmp
268 ; X64-NEXT: testl %eax, %eax
269 ; X64-NEXT: sete %al
270 ; X64-NEXT: popq %rcx
271 ; X64-NEXT: retq
273 %c = icmp eq i32 %m, 0
279 ; X86: # %bb.0:
281 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
282 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
302 ; X64-LABEL: length3:
303 ; X64: # %bb.0:
304 ; X64-NEXT: movzwl (%rdi), %eax
305 ; X64-NEXT: movzwl (%rsi), %ecx
306 ; X64-NEXT: rolw $8, %ax
307 ; X64-NEXT: rolw $8, %cx
308 ; X64-NEXT: cmpw %cx, %ax
309 ; X64-NEXT: jne .LBB11_3
310 ; X64-NEXT: # %bb.1: # %loadbb1
311 ; X64-NEXT: movzbl 2(%rdi), %eax
312 ; X64-NEXT: movzbl 2(%rsi), %ecx
313 ; X64-NEXT: subl %ecx, %eax
314 ; X64-NEXT: retq
315 ; X64-NEXT: .LBB11_3: # %res_block
316 ; X64-NEXT: setae %al
317 ; X64-NEXT: movzbl %al, %eax
318 ; X64-NEXT: leal -1(%rax,%rax), %eax
319 ; X64-NEXT: retq
326 ; X86: # %bb.0:
327 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
328 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
338 ; X64-LABEL: length3_eq:
339 ; X64: # %bb.0:
340 ; X64-NEXT: movzwl (%rdi), %eax
341 ; X64-NEXT: xorw (%rsi), %ax
342 ; X64-NEXT: movb 2(%rdi), %cl
343 ; X64-NEXT: xorb 2(%rsi), %cl
344 ; X64-NEXT: movzbl %cl, %ecx
345 ; X64-NEXT: orw %ax, %cx
346 ; X64-NEXT: setne %al
347 ; X64-NEXT: retq
349 %c = icmp ne i32 %m, 0
355 ; X86: # %bb.0:
356 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
357 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
365 ; X86-NEXT: sbbl $0, %eax
368 ; X64-LABEL: length4:
369 ; X64: # %bb.0:
370 ; X64-NEXT: movl (%rdi), %ecx
371 ; X64-NEXT: movl (%rsi), %edx
372 ; X64-NEXT: bswapl %ecx
373 ; X64-NEXT: bswapl %edx
374 ; X64-NEXT: xorl %eax, %eax
375 ; X64-NEXT: cmpl %edx, %ecx
376 ; X64-NEXT: seta %al
377 ; X64-NEXT: sbbl $0, %eax
378 ; X64-NEXT: retq
385 ; X86: # %bb.0:
386 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
387 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
393 ; X64-LABEL: length4_eq:
394 ; X64: # %bb.0:
395 ; X64-NEXT: movl (%rdi), %eax
396 ; X64-NEXT: cmpl (%rsi), %eax
397 ; X64-NEXT: setne %al
398 ; X64-NEXT: retq
400 %c = icmp ne i32 %m, 0
406 ; X86: # %bb.0:
407 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
408 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
416 ; X86-NEXT: sbbl $0, %eax
421 ; X64-LABEL: length4_lt:
422 ; X64: # %bb.0:
423 ; X64-NEXT: movl (%rdi), %ecx
424 ; X64-NEXT: movl (%rsi), %edx
425 ; X64-NEXT: bswapl %ecx
426 ; X64-NEXT: bswapl %edx
427 ; X64-NEXT: xorl %eax, %eax
428 ; X64-NEXT: cmpl %edx, %ecx
429 ; X64-NEXT: seta %al
430 ; X64-NEXT: sbbl $0, %eax
431 ; X64-NEXT: shrl $31, %eax
432 ; X64-NEXT: # kill: def $al killed $al killed $eax
433 ; X64-NEXT: retq
435 %c = icmp slt i32 %m, 0
441 ; X86: # %bb.0:
442 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
443 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
451 ; X86-NEXT: sbbl $0, %edx
456 ; X64-LABEL: length4_gt:
457 ; X64: # %bb.0:
458 ; X64-NEXT: movl (%rdi), %eax
459 ; X64-NEXT: movl (%rsi), %ecx
460 ; X64-NEXT: bswapl %eax
461 ; X64-NEXT: bswapl %ecx
462 ; X64-NEXT: xorl %edx, %edx
463 ; X64-NEXT: cmpl %ecx, %eax
464 ; X64-NEXT: seta %dl
465 ; X64-NEXT: sbbl $0, %edx
466 ; X64-NEXT: testl %edx, %edx
467 ; X64-NEXT: setg %al
468 ; X64-NEXT: retq
470 %c = icmp sgt i32 %m, 0
476 ; X86: # %bb.0:
477 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
478 ; X86-NEXT: cmpl $875770417, (%eax) # imm = 0x34333231
482 ; X64-LABEL: length4_eq_const:
483 ; X64: # %bb.0:
484 ; X64-NEXT: cmpl $875770417, (%rdi) # imm = 0x34333231
485 ; X64-NEXT: sete %al
486 ; X64-NEXT: retq
487 …mcmp(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 1), i64 4) noun…
488 %c = icmp eq i32 %m, 0
494 ; X86: # %bb.0:
496 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
497 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
517 ; X64-LABEL: length5:
518 ; X64: # %bb.0:
519 ; X64-NEXT: movl (%rdi), %eax
520 ; X64-NEXT: movl (%rsi), %ecx
521 ; X64-NEXT: bswapl %eax
522 ; X64-NEXT: bswapl %ecx
523 ; X64-NEXT: cmpl %ecx, %eax
524 ; X64-NEXT: jne .LBB18_3
525 ; X64-NEXT: # %bb.1: # %loadbb1
526 ; X64-NEXT: movzbl 4(%rdi), %eax
527 ; X64-NEXT: movzbl 4(%rsi), %ecx
528 ; X64-NEXT: subl %ecx, %eax
529 ; X64-NEXT: retq
530 ; X64-NEXT: .LBB18_3: # %res_block
531 ; X64-NEXT: setae %al
532 ; X64-NEXT: movzbl %al, %eax
533 ; X64-NEXT: leal -1(%rax,%rax), %eax
534 ; X64-NEXT: retq
541 ; X86: # %bb.0:
542 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
543 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
553 ; X64-LABEL: length5_eq:
554 ; X64: # %bb.0:
555 ; X64-NEXT: movl (%rdi), %eax
556 ; X64-NEXT: xorl (%rsi), %eax
557 ; X64-NEXT: movb 4(%rdi), %cl
558 ; X64-NEXT: xorb 4(%rsi), %cl
559 ; X64-NEXT: movzbl %cl, %ecx
560 ; X64-NEXT: orl %eax, %ecx
561 ; X64-NEXT: setne %al
562 ; X64-NEXT: retq
564 %c = icmp ne i32 %m, 0
570 ; X86: # %bb.0:
572 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
573 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
595 ; X64-LABEL: length5_lt:
596 ; X64: # %bb.0:
597 ; X64-NEXT: movl (%rdi), %eax
598 ; X64-NEXT: movl (%rsi), %ecx
599 ; X64-NEXT: bswapl %eax
600 ; X64-NEXT: bswapl %ecx
601 ; X64-NEXT: cmpl %ecx, %eax
602 ; X64-NEXT: jne .LBB20_3
603 ; X64-NEXT: # %bb.1: # %loadbb1
604 ; X64-NEXT: movzbl 4(%rdi), %eax
605 ; X64-NEXT: movzbl 4(%rsi), %ecx
606 ; X64-NEXT: subl %ecx, %eax
607 ; X64-NEXT: shrl $31, %eax
608 ; X64-NEXT: # kill: def $al killed $al killed $eax
609 ; X64-NEXT: retq
610 ; X64-NEXT: .LBB20_3: # %res_block
611 ; X64-NEXT: setae %al
612 ; X64-NEXT: movzbl %al, %eax
613 ; X64-NEXT: leal -1(%rax,%rax), %eax
614 ; X64-NEXT: shrl $31, %eax
615 ; X64-NEXT: # kill: def $al killed $al killed $eax
616 ; X64-NEXT: retq
618 %c = icmp slt i32 %m, 0
624 ; X86: # %bb.0:
626 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
627 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
651 ; X64-LABEL: length7:
652 ; X64: # %bb.0:
653 ; X64-NEXT: movl (%rdi), %ecx
654 ; X64-NEXT: movl (%rsi), %edx
655 ; X64-NEXT: bswapl %ecx
656 ; X64-NEXT: bswapl %edx
657 ; X64-NEXT: cmpl %edx, %ecx
658 ; X64-NEXT: jne .LBB21_2
659 ; X64-NEXT: # %bb.1: # %loadbb1
660 ; X64-NEXT: movl 3(%rdi), %ecx
661 ; X64-NEXT: movl 3(%rsi), %edx
662 ; X64-NEXT: bswapl %ecx
663 ; X64-NEXT: bswapl %edx
664 ; X64-NEXT: xorl %eax, %eax
665 ; X64-NEXT: cmpl %edx, %ecx
666 ; X64-NEXT: je .LBB21_3
667 ; X64-NEXT: .LBB21_2: # %res_block
668 ; X64-NEXT: xorl %eax, %eax
669 ; X64-NEXT: cmpl %edx, %ecx
670 ; X64-NEXT: setae %al
671 ; X64-NEXT: leal -1(%rax,%rax), %eax
672 ; X64-NEXT: .LBB21_3: # %endblock
673 ; X64-NEXT: retq
680 ; X86: # %bb.0:
682 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
683 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
709 ; X64-LABEL: length7_lt:
710 ; X64: # %bb.0:
711 ; X64-NEXT: movl (%rdi), %ecx
712 ; X64-NEXT: movl (%rsi), %edx
713 ; X64-NEXT: bswapl %ecx
714 ; X64-NEXT: bswapl %edx
715 ; X64-NEXT: cmpl %edx, %ecx
716 ; X64-NEXT: jne .LBB22_2
717 ; X64-NEXT: # %bb.1: # %loadbb1
718 ; X64-NEXT: movl 3(%rdi), %ecx
719 ; X64-NEXT: movl 3(%rsi), %edx
720 ; X64-NEXT: bswapl %ecx
721 ; X64-NEXT: bswapl %edx
722 ; X64-NEXT: xorl %eax, %eax
723 ; X64-NEXT: cmpl %edx, %ecx
724 ; X64-NEXT: je .LBB22_3
725 ; X64-NEXT: .LBB22_2: # %res_block
726 ; X64-NEXT: xorl %eax, %eax
727 ; X64-NEXT: cmpl %edx, %ecx
728 ; X64-NEXT: setae %al
729 ; X64-NEXT: leal -1(%rax,%rax), %eax
730 ; X64-NEXT: .LBB22_3: # %endblock
731 ; X64-NEXT: shrl $31, %eax
732 ; X64-NEXT: # kill: def $al killed $al killed $eax
733 ; X64-NEXT: retq
735 %c = icmp slt i32 %m, 0
741 ; X86: # %bb.0:
742 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
743 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
752 ; X64-LABEL: length7_eq:
753 ; X64: # %bb.0:
754 ; X64-NEXT: movl (%rdi), %eax
755 ; X64-NEXT: movl 3(%rdi), %ecx
756 ; X64-NEXT: xorl (%rsi), %eax
757 ; X64-NEXT: xorl 3(%rsi), %ecx
758 ; X64-NEXT: orl %eax, %ecx
759 ; X64-NEXT: setne %al
760 ; X64-NEXT: retq
762 %c = icmp ne i32 %m, 0
768 ; X86: # %bb.0:
770 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
771 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
795 ; X64-LABEL: length8:
796 ; X64: # %bb.0:
797 ; X64-NEXT: movq (%rdi), %rcx
798 ; X64-NEXT: movq (%rsi), %rdx
799 ; X64-NEXT: bswapq %rcx
800 ; X64-NEXT: bswapq %rdx
801 ; X64-NEXT: xorl %eax, %eax
802 ; X64-NEXT: cmpq %rdx, %rcx
803 ; X64-NEXT: seta %al
804 ; X64-NEXT: sbbl $0, %eax
805 ; X64-NEXT: retq
812 ; X86: # %bb.0:
813 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
814 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
823 ; X64-LABEL: length8_eq:
824 ; X64: # %bb.0:
825 ; X64-NEXT: movq (%rdi), %rax
826 ; X64-NEXT: cmpq (%rsi), %rax
827 ; X64-NEXT: sete %al
828 ; X64-NEXT: retq
830 %c = icmp eq i32 %m, 0
836 ; X86: # %bb.0:
837 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
838 ; X86-NEXT: movl $858927408, %ecx # imm = 0x33323130
840 ; X86-NEXT: movl $926299444, %edx # imm = 0x37363534
846 ; X64-LABEL: length8_eq_const:
847 ; X64: # %bb.0:
848 ; X64-NEXT: movabsq $3978425819141910832, %rax # imm = 0x3736353433323130
849 ; X64-NEXT: cmpq %rax, (%rdi)
850 ; X64-NEXT: setne %al
851 ; X64-NEXT: retq
852 …p(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 8) nounwind
853 %c = icmp ne i32 %m, 0
859 ; X86: # %bb.0:
860 ; X86-NEXT: pushl $0
862 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
863 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
870 ; X64-LABEL: length9_eq:
871 ; X64: # %bb.0:
872 ; X64-NEXT: movq (%rdi), %rax
873 ; X64-NEXT: xorq (%rsi), %rax
874 ; X64-NEXT: movb 8(%rdi), %cl
875 ; X64-NEXT: xorb 8(%rsi), %cl
876 ; X64-NEXT: movzbl %cl, %ecx
877 ; X64-NEXT: orq %rax, %rcx
878 ; X64-NEXT: sete %al
879 ; X64-NEXT: retq
881 %c = icmp eq i32 %m, 0
887 ; X86: # %bb.0:
888 ; X86-NEXT: pushl $0
890 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
891 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
898 ; X64-LABEL: length10_eq:
899 ; X64: # %bb.0:
900 ; X64-NEXT: movq (%rdi), %rax
901 ; X64-NEXT: xorq (%rsi), %rax
902 ; X64-NEXT: movzwl 8(%rdi), %ecx
903 ; X64-NEXT: xorw 8(%rsi), %cx
904 ; X64-NEXT: movzwl %cx, %ecx
905 ; X64-NEXT: orq %rax, %rcx
906 ; X64-NEXT: sete %al
907 ; X64-NEXT: retq
909 %c = icmp eq i32 %m, 0
915 ; X86: # %bb.0:
916 ; X86-NEXT: pushl $0
918 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
919 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
926 ; X64-LABEL: length11_eq:
927 ; X64: # %bb.0:
928 ; X64-NEXT: movq (%rdi), %rax
929 ; X64-NEXT: movq 3(%rdi), %rcx
930 ; X64-NEXT: xorq (%rsi), %rax
931 ; X64-NEXT: xorq 3(%rsi), %rcx
932 ; X64-NEXT: orq %rax, %rcx
933 ; X64-NEXT: sete %al
934 ; X64-NEXT: retq
936 %c = icmp eq i32 %m, 0
942 ; X86: # %bb.0:
943 ; X86-NEXT: pushl $0
945 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
946 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
953 ; X64-LABEL: length12_eq:
954 ; X64: # %bb.0:
955 ; X64-NEXT: movq (%rdi), %rax
956 ; X64-NEXT: xorq (%rsi), %rax
957 ; X64-NEXT: movl 8(%rdi), %ecx
958 ; X64-NEXT: xorl 8(%rsi), %ecx
959 ; X64-NEXT: orq %rax, %rcx
960 ; X64-NEXT: setne %al
961 ; X64-NEXT: retq
963 %c = icmp ne i32 %m, 0
969 ; X86: # %bb.0:
970 ; X86-NEXT: pushl $0
972 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
973 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
978 ; X64-LABEL: length12:
979 ; X64: # %bb.0:
980 ; X64-NEXT: movq (%rdi), %rcx
981 ; X64-NEXT: movq (%rsi), %rdx
982 ; X64-NEXT: bswapq %rcx
983 ; X64-NEXT: bswapq %rdx
984 ; X64-NEXT: cmpq %rdx, %rcx
985 ; X64-NEXT: jne .LBB31_2
986 ; X64-NEXT: # %bb.1: # %loadbb1
987 ; X64-NEXT: movl 8(%rdi), %ecx
988 ; X64-NEXT: movl 8(%rsi), %edx
989 ; X64-NEXT: bswapl %ecx
990 ; X64-NEXT: bswapl %edx
991 ; X64-NEXT: xorl %eax, %eax
992 ; X64-NEXT: cmpq %rdx, %rcx
993 ; X64-NEXT: je .LBB31_3
994 ; X64-NEXT: .LBB31_2: # %res_block
995 ; X64-NEXT: xorl %eax, %eax
996 ; X64-NEXT: cmpq %rdx, %rcx
997 ; X64-NEXT: setae %al
998 ; X64-NEXT: leal -1(%rax,%rax), %eax
999 ; X64-NEXT: .LBB31_3: # %endblock
1000 ; X64-NEXT: retq
1007 ; X86: # %bb.0:
1008 ; X86-NEXT: pushl $0
1010 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1011 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1018 ; X64-LABEL: length13_eq:
1019 ; X64: # %bb.0:
1020 ; X64-NEXT: movq (%rdi), %rax
1021 ; X64-NEXT: movq 5(%rdi), %rcx
1022 ; X64-NEXT: xorq (%rsi), %rax
1023 ; X64-NEXT: xorq 5(%rsi), %rcx
1024 ; X64-NEXT: orq %rax, %rcx
1025 ; X64-NEXT: sete %al
1026 ; X64-NEXT: retq
1028 %c = icmp eq i32 %m, 0
1034 ; X86: # %bb.0:
1035 ; X86-NEXT: pushl $0
1037 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1038 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1045 ; X64-LABEL: length14_eq:
1046 ; X64: # %bb.0:
1047 ; X64-NEXT: movq (%rdi), %rax
1048 ; X64-NEXT: movq 6(%rdi), %rcx
1049 ; X64-NEXT: xorq (%rsi), %rax
1050 ; X64-NEXT: xorq 6(%rsi), %rcx
1051 ; X64-NEXT: orq %rax, %rcx
1052 ; X64-NEXT: sete %al
1053 ; X64-NEXT: retq
1055 %c = icmp eq i32 %m, 0
1061 ; X86: # %bb.0:
1062 ; X86-NEXT: pushl $0
1064 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1065 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1070 ; X64-LABEL: length15:
1071 ; X64: # %bb.0:
1072 ; X64-NEXT: movq (%rdi), %rcx
1073 ; X64-NEXT: movq (%rsi), %rdx
1074 ; X64-NEXT: bswapq %rcx
1075 ; X64-NEXT: bswapq %rdx
1076 ; X64-NEXT: cmpq %rdx, %rcx
1077 ; X64-NEXT: jne .LBB34_2
1078 ; X64-NEXT: # %bb.1: # %loadbb1
1079 ; X64-NEXT: movq 7(%rdi), %rcx
1080 ; X64-NEXT: movq 7(%rsi), %rdx
1081 ; X64-NEXT: bswapq %rcx
1082 ; X64-NEXT: bswapq %rdx
1083 ; X64-NEXT: xorl %eax, %eax
1084 ; X64-NEXT: cmpq %rdx, %rcx
1085 ; X64-NEXT: je .LBB34_3
1086 ; X64-NEXT: .LBB34_2: # %res_block
1087 ; X64-NEXT: xorl %eax, %eax
1088 ; X64-NEXT: cmpq %rdx, %rcx
1089 ; X64-NEXT: setae %al
1090 ; X64-NEXT: leal -1(%rax,%rax), %eax
1091 ; X64-NEXT: .LBB34_3: # %endblock
1092 ; X64-NEXT: retq
1099 ; X86: # %bb.0:
1100 ; X86-NEXT: pushl $0
1102 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1103 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1110 ; X64-LABEL: length15_lt:
1111 ; X64: # %bb.0:
1112 ; X64-NEXT: movq (%rdi), %rcx
1113 ; X64-NEXT: movq (%rsi), %rdx
1114 ; X64-NEXT: bswapq %rcx
1115 ; X64-NEXT: bswapq %rdx
1116 ; X64-NEXT: cmpq %rdx, %rcx
1117 ; X64-NEXT: jne .LBB35_2
1118 ; X64-NEXT: # %bb.1: # %loadbb1
1119 ; X64-NEXT: movq 7(%rdi), %rcx
1120 ; X64-NEXT: movq 7(%rsi), %rdx
1121 ; X64-NEXT: bswapq %rcx
1122 ; X64-NEXT: bswapq %rdx
1123 ; X64-NEXT: xorl %eax, %eax
1124 ; X64-NEXT: cmpq %rdx, %rcx
1125 ; X64-NEXT: je .LBB35_3
1126 ; X64-NEXT: .LBB35_2: # %res_block
1127 ; X64-NEXT: xorl %eax, %eax
1128 ; X64-NEXT: cmpq %rdx, %rcx
1129 ; X64-NEXT: setae %al
1130 ; X64-NEXT: leal -1(%rax,%rax), %eax
1131 ; X64-NEXT: .LBB35_3: # %endblock
1132 ; X64-NEXT: shrl $31, %eax
1133 ; X64-NEXT: # kill: def $al killed $al killed $eax
1134 ; X64-NEXT: retq
1136 %c = icmp slt i32 %m, 0
1142 ; X86: # %bb.0:
1143 ; X86-NEXT: pushl $0
1146 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1151 ; X64-LABEL: length15_const:
1152 ; X64: # %bb.0:
1153 ; X64-NEXT: movabsq $3544952156018063160, %rcx # imm = 0x3132333435363738
1154 ; X64-NEXT: movq (%rdi), %rdx
1155 ; X64-NEXT: bswapq %rdx
1156 ; X64-NEXT: cmpq %rcx, %rdx
1157 ; X64-NEXT: jne .LBB36_2
1158 ; X64-NEXT: # %bb.1: # %loadbb1
1159 ; X64-NEXT: movabsq $4051322327650219061, %rcx # imm = 0x3839303132333435
1160 ; X64-NEXT: movq 7(%rdi), %rdx
1161 ; X64-NEXT: bswapq %rdx
1162 ; X64-NEXT: xorl %eax, %eax
1163 ; X64-NEXT: cmpq %rcx, %rdx
1164 ; X64-NEXT: je .LBB36_3
1165 ; X64-NEXT: .LBB36_2: # %res_block
1166 ; X64-NEXT: xorl %eax, %eax
1167 ; X64-NEXT: cmpq %rcx, %rdx
1168 ; X64-NEXT: setae %al
1169 ; X64-NEXT: leal -1(%rax,%rax), %eax
1170 ; X64-NEXT: .LBB36_3: # %endblock
1171 ; X64-NEXT: retq
1172 …mcmp(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 1), i64 15) nou…
1178 ; X86: # %bb.0:
1179 ; X86-NEXT: pushl $0
1181 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1182 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1189 ; X64-LABEL: length15_eq:
1190 ; X64: # %bb.0:
1191 ; X64-NEXT: movq (%rdi), %rax
1192 ; X64-NEXT: movq 7(%rdi), %rcx
1193 ; X64-NEXT: xorq (%rsi), %rax
1194 ; X64-NEXT: xorq 7(%rsi), %rcx
1195 ; X64-NEXT: orq %rax, %rcx
1196 ; X64-NEXT: sete %al
1197 ; X64-NEXT: retq
1199 %c = icmp eq i32 %m, 0
1205 ; X86: # %bb.0:
1206 ; X86-NEXT: pushl $0
1209 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1216 ; X64-LABEL: length15_gt_const:
1217 ; X64: # %bb.0:
1218 ; X64-NEXT: movabsq $3544952156018063160, %rax # imm = 0x3132333435363738
1219 ; X64-NEXT: movq (%rdi), %rcx
1220 ; X64-NEXT: bswapq %rcx
1221 ; X64-NEXT: cmpq %rax, %rcx
1222 ; X64-NEXT: jne .LBB38_2
1223 ; X64-NEXT: # %bb.1: # %loadbb1
1224 ; X64-NEXT: movabsq $4051322327650219061, %rax # imm = 0x3839303132333435
1225 ; X64-NEXT: movq 7(%rdi), %rcx
1226 ; X64-NEXT: bswapq %rcx
1227 ; X64-NEXT: xorl %edx, %edx
1228 ; X64-NEXT: cmpq %rax, %rcx
1229 ; X64-NEXT: je .LBB38_3
1230 ; X64-NEXT: .LBB38_2: # %res_block
1231 ; X64-NEXT: xorl %edx, %edx
1232 ; X64-NEXT: cmpq %rax, %rcx
1233 ; X64-NEXT: setae %dl
1234 ; X64-NEXT: leal -1(%rdx,%rdx), %edx
1235 ; X64-NEXT: .LBB38_3: # %endblock
1236 ; X64-NEXT: testl %edx, %edx
1237 ; X64-NEXT: setg %al
1238 ; X64-NEXT: retq
1239 …mcmp(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 1), i64 15) nou…
1240 %c = icmp sgt i32 %m, 0
1248 ; X86: # %bb.0:
1249 ; X86-NEXT: pushl $0
1251 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1252 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1257 ; X64-LABEL: length16:
1258 ; X64: # %bb.0:
1259 ; X64-NEXT: movq (%rdi), %rcx
1260 ; X64-NEXT: movq (%rsi), %rdx
1261 ; X64-NEXT: bswapq %rcx
1262 ; X64-NEXT: bswapq %rdx
1263 ; X64-NEXT: cmpq %rdx, %rcx
1264 ; X64-NEXT: jne .LBB39_2
1265 ; X64-NEXT: # %bb.1: # %loadbb1
1266 ; X64-NEXT: movq 8(%rdi), %rcx
1267 ; X64-NEXT: movq 8(%rsi), %rdx
1268 ; X64-NEXT: bswapq %rcx
1269 ; X64-NEXT: bswapq %rdx
1270 ; X64-NEXT: xorl %eax, %eax
1271 ; X64-NEXT: cmpq %rdx, %rcx
1272 ; X64-NEXT: je .LBB39_3
1273 ; X64-NEXT: .LBB39_2: # %res_block
1274 ; X64-NEXT: xorl %eax, %eax
1275 ; X64-NEXT: cmpq %rdx, %rcx
1276 ; X64-NEXT: setae %al
1277 ; X64-NEXT: leal -1(%rax,%rax), %eax
1278 ; X64-NEXT: .LBB39_3: # %endblock
1279 ; X64-NEXT: retq
1286 ; X86-NOSSE: # %bb.0:
1287 ; X86-NOSSE-NEXT: pushl $0
1289 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1290 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1298 ; X86-SSE1: # %bb.0:
1299 ; X86-SSE1-NEXT: pushl $0
1301 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1302 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1310 ; X86-SSE2: # %bb.0:
1311 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1312 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
1317 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1322 ; X86-SSE41: # %bb.0:
1323 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
1324 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %ecx
1332 ; X64-SSE2-LABEL: length16_eq:
1333 ; X64-SSE2: # %bb.0:
1334 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
1335 ; X64-SSE2-NEXT: movdqu (%rsi), %xmm1
1336 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm1
1337 ; X64-SSE2-NEXT: pmovmskb %xmm1, %eax
1338 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1339 ; X64-SSE2-NEXT: setne %al
1340 ; X64-SSE2-NEXT: retq
1342 ; X64-SSE41-LABEL: length16_eq:
1343 ; X64-SSE41: # %bb.0:
1344 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
1345 ; X64-SSE41-NEXT: movdqu (%rsi), %xmm1
1346 ; X64-SSE41-NEXT: pxor %xmm0, %xmm1
1347 ; X64-SSE41-NEXT: ptest %xmm1, %xmm1
1348 ; X64-SSE41-NEXT: setne %al
1349 ; X64-SSE41-NEXT: retq
1351 ; X64-AVX-LABEL: length16_eq:
1352 ; X64-AVX: # %bb.0:
1353 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
1354 ; X64-AVX-NEXT: vpxor (%rsi), %xmm0, %xmm0
1355 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
1356 ; X64-AVX-NEXT: setne %al
1357 ; X64-AVX-NEXT: retq
1359 ; X64-MIC-AVX-LABEL: length16_eq:
1360 ; X64-MIC-AVX: # %bb.0:
1361 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
1362 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %xmm1
1363 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k0
1364 ; X64-MIC-AVX-NEXT: kortestw %k0, %k0
1365 ; X64-MIC-AVX-NEXT: setne %al
1366 ; X64-MIC-AVX-NEXT: vzeroupper
1367 ; X64-MIC-AVX-NEXT: retq
1369 %cmp = icmp ne i32 %call, 0
1375 ; X86: # %bb.0:
1376 ; X86-NEXT: pushl $0
1378 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1379 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1386 ; X64-LABEL: length16_lt:
1387 ; X64: # %bb.0:
1388 ; X64-NEXT: movq (%rdi), %rcx
1389 ; X64-NEXT: movq (%rsi), %rdx
1390 ; X64-NEXT: bswapq %rcx
1391 ; X64-NEXT: bswapq %rdx
1392 ; X64-NEXT: cmpq %rdx, %rcx
1393 ; X64-NEXT: jne .LBB41_2
1394 ; X64-NEXT: # %bb.1: # %loadbb1
1395 ; X64-NEXT: movq 8(%rdi), %rcx
1396 ; X64-NEXT: movq 8(%rsi), %rdx
1397 ; X64-NEXT: bswapq %rcx
1398 ; X64-NEXT: bswapq %rdx
1399 ; X64-NEXT: xorl %eax, %eax
1400 ; X64-NEXT: cmpq %rdx, %rcx
1401 ; X64-NEXT: je .LBB41_3
1402 ; X64-NEXT: .LBB41_2: # %res_block
1403 ; X64-NEXT: xorl %eax, %eax
1404 ; X64-NEXT: cmpq %rdx, %rcx
1405 ; X64-NEXT: setae %al
1406 ; X64-NEXT: leal -1(%rax,%rax), %eax
1407 ; X64-NEXT: .LBB41_3: # %endblock
1408 ; X64-NEXT: shrl $31, %eax
1409 ; X64-NEXT: # kill: def $al killed $al killed $eax
1410 ; X64-NEXT: retq
1412 %cmp = icmp slt i32 %call, 0
1418 ; X86: # %bb.0:
1419 ; X86-NEXT: pushl $0
1421 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1422 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1429 ; X64-LABEL: length16_gt:
1430 ; X64: # %bb.0:
1431 ; X64-NEXT: movq (%rdi), %rax
1432 ; X64-NEXT: movq (%rsi), %rcx
1433 ; X64-NEXT: bswapq %rax
1434 ; X64-NEXT: bswapq %rcx
1435 ; X64-NEXT: cmpq %rcx, %rax
1436 ; X64-NEXT: jne .LBB42_2
1437 ; X64-NEXT: # %bb.1: # %loadbb1
1438 ; X64-NEXT: movq 8(%rdi), %rax
1439 ; X64-NEXT: movq 8(%rsi), %rcx
1440 ; X64-NEXT: bswapq %rax
1441 ; X64-NEXT: bswapq %rcx
1442 ; X64-NEXT: xorl %edx, %edx
1443 ; X64-NEXT: cmpq %rcx, %rax
1444 ; X64-NEXT: je .LBB42_3
1445 ; X64-NEXT: .LBB42_2: # %res_block
1446 ; X64-NEXT: xorl %edx, %edx
1447 ; X64-NEXT: cmpq %rcx, %rax
1448 ; X64-NEXT: setae %dl
1449 ; X64-NEXT: leal -1(%rdx,%rdx), %edx
1450 ; X64-NEXT: .LBB42_3: # %endblock
1451 ; X64-NEXT: testl %edx, %edx
1452 ; X64-NEXT: setg %al
1453 ; X64-NEXT: retq
1455 %cmp = icmp sgt i32 %call, 0
1461 ; X86-NOSSE: # %bb.0:
1462 ; X86-NOSSE-NEXT: pushl $0
1465 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1473 ; X86-SSE1: # %bb.0:
1474 ; X86-SSE1-NEXT: pushl $0
1477 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1485 ; X86-SSE2: # %bb.0:
1486 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1490 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1495 ; X86-SSE41: # %bb.0:
1496 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
1503 ; X64-SSE2-LABEL: length16_eq_const:
1504 ; X64-SSE2: # %bb.0:
1505 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
1506 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm0
1507 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
1508 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1509 ; X64-SSE2-NEXT: sete %al
1510 ; X64-SSE2-NEXT: retq
1512 ; X64-SSE41-LABEL: length16_eq_const:
1513 ; X64-SSE41: # %bb.0:
1514 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
1515 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm0
1516 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
1517 ; X64-SSE41-NEXT: sete %al
1518 ; X64-SSE41-NEXT: retq
1520 ; X64-AVX-LABEL: length16_eq_const:
1521 ; X64-AVX: # %bb.0:
1522 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
1523 ; X64-AVX-NEXT: vpxor {{.*}}(%rip), %xmm0, %xmm0
1524 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
1525 ; X64-AVX-NEXT: sete %al
1526 ; X64-AVX-NEXT: retq
1528 ; X64-MIC-AVX-LABEL: length16_eq_const:
1529 ; X64-MIC-AVX: # %bb.0:
1530 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
1531 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} xmm1 = [858927408,926299444,825243960,892613426]
1532 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k0
1533 ; X64-MIC-AVX-NEXT: kortestw %k0, %k0
1534 ; X64-MIC-AVX-NEXT: sete %al
1535 ; X64-MIC-AVX-NEXT: vzeroupper
1536 ; X64-MIC-AVX-NEXT: retq
1537 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 16) nounwind
1538 %c = icmp eq i32 %m, 0
1546 ; X86: # %bb.0:
1547 ; X86-NEXT: pushl $0
1549 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1550 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1555 ; X64-LABEL: length24:
1556 ; X64: # %bb.0:
1557 ; X64-NEXT: movl $24, %edx
1558 ; X64-NEXT: jmp memcmp # TAILCALL
1565 ; X86-NOSSE: # %bb.0:
1566 ; X86-NOSSE-NEXT: pushl $0
1568 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1569 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1577 ; X86-SSE1: # %bb.0:
1578 ; X86-SSE1-NEXT: pushl $0
1580 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1581 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1589 ; X86-SSE2: # %bb.0:
1590 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1591 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
1600 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1605 ; X86-SSE41: # %bb.0:
1606 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
1607 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %ecx
1619 ; X64-SSE2-LABEL: length24_eq:
1620 ; X64-SSE2: # %bb.0:
1621 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
1622 ; X64-SSE2-NEXT: movdqu (%rsi), %xmm1
1623 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm1
1624 ; X64-SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
1625 ; X64-SSE2-NEXT: movq {{.*#+}} xmm2 = mem[0],zero
1626 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm2
1627 ; X64-SSE2-NEXT: pand %xmm1, %xmm2
1628 ; X64-SSE2-NEXT: pmovmskb %xmm2, %eax
1629 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1630 ; X64-SSE2-NEXT: sete %al
1631 ; X64-SSE2-NEXT: retq
1633 ; X64-SSE41-LABEL: length24_eq:
1634 ; X64-SSE41: # %bb.0:
1635 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
1636 ; X64-SSE41-NEXT: movdqu (%rsi), %xmm1
1637 ; X64-SSE41-NEXT: pxor %xmm0, %xmm1
1638 ; X64-SSE41-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
1639 ; X64-SSE41-NEXT: movq {{.*#+}} xmm2 = mem[0],zero
1640 ; X64-SSE41-NEXT: pxor %xmm0, %xmm2
1641 ; X64-SSE41-NEXT: por %xmm1, %xmm2
1642 ; X64-SSE41-NEXT: ptest %xmm2, %xmm2
1643 ; X64-SSE41-NEXT: sete %al
1644 ; X64-SSE41-NEXT: retq
1646 ; X64-AVX-LABEL: length24_eq:
1647 ; X64-AVX: # %bb.0:
1648 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
1649 ; X64-AVX-NEXT: vmovq {{.*#+}} xmm1 = mem[0],zero
1650 ; X64-AVX-NEXT: vmovq {{.*#+}} xmm2 = mem[0],zero
1651 ; X64-AVX-NEXT: vpxor %xmm2, %xmm1, %xmm1
1652 ; X64-AVX-NEXT: vpxor (%rsi), %xmm0, %xmm0
1653 ; X64-AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
1654 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
1655 ; X64-AVX-NEXT: sete %al
1656 ; X64-AVX-NEXT: retq
1658 ; X64-MIC-AVX-LABEL: length24_eq:
1659 ; X64-MIC-AVX: # %bb.0:
1660 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
1661 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %xmm1
1662 ; X64-MIC-AVX-NEXT: vmovq {{.*#+}} xmm2 = mem[0],zero
1663 ; X64-MIC-AVX-NEXT: vmovq {{.*#+}} xmm3 = mem[0],zero
1664 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm3, %zmm2, %k0
1665 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
1666 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
1667 ; X64-MIC-AVX-NEXT: sete %al
1668 ; X64-MIC-AVX-NEXT: vzeroupper
1669 ; X64-MIC-AVX-NEXT: retq
1671 %cmp = icmp eq i32 %call, 0
1677 ; X86: # %bb.0:
1678 ; X86-NEXT: pushl $0
1680 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1681 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1688 ; X64-LABEL: length24_lt:
1689 ; X64: # %bb.0:
1690 ; X64-NEXT: pushq %rax
1691 ; X64-NEXT: movl $24, %edx
1692 ; X64-NEXT: callq memcmp
1693 ; X64-NEXT: shrl $31, %eax
1694 ; X64-NEXT: # kill: def $al killed $al killed $eax
1695 ; X64-NEXT: popq %rcx
1696 ; X64-NEXT: retq
1698 %cmp = icmp slt i32 %call, 0
1704 ; X86: # %bb.0:
1705 ; X86-NEXT: pushl $0
1707 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1708 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1715 ; X64-LABEL: length24_gt:
1716 ; X64: # %bb.0:
1717 ; X64-NEXT: pushq %rax
1718 ; X64-NEXT: movl $24, %edx
1719 ; X64-NEXT: callq memcmp
1720 ; X64-NEXT: testl %eax, %eax
1721 ; X64-NEXT: setg %al
1722 ; X64-NEXT: popq %rcx
1723 ; X64-NEXT: retq
1725 %cmp = icmp sgt i32 %call, 0
1731 ; X86-NOSSE: # %bb.0:
1732 ; X86-NOSSE-NEXT: pushl $0
1735 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1743 ; X86-SSE1: # %bb.0:
1744 ; X86-SSE1-NEXT: pushl $0
1747 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1755 ; X86-SSE2: # %bb.0:
1756 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1763 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1768 ; X86-SSE41: # %bb.0:
1769 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
1779 ; X64-SSE2-LABEL: length24_eq_const:
1780 ; X64-SSE2: # %bb.0:
1781 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
1782 ; X64-SSE2-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
1783 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm1
1784 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm0
1785 ; X64-SSE2-NEXT: pand %xmm1, %xmm0
1786 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
1787 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1788 ; X64-SSE2-NEXT: setne %al
1789 ; X64-SSE2-NEXT: retq
1791 ; X64-SSE41-LABEL: length24_eq_const:
1792 ; X64-SSE41: # %bb.0:
1793 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
1794 ; X64-SSE41-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
1795 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm1
1796 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm0
1797 ; X64-SSE41-NEXT: por %xmm1, %xmm0
1798 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
1799 ; X64-SSE41-NEXT: setne %al
1800 ; X64-SSE41-NEXT: retq
1802 ; X64-AVX-LABEL: length24_eq_const:
1803 ; X64-AVX: # %bb.0:
1804 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
1805 ; X64-AVX-NEXT: vmovq {{.*#+}} xmm1 = mem[0],zero
1806 ; X64-AVX-NEXT: vpxor {{.*}}(%rip), %xmm1, %xmm1
1807 ; X64-AVX-NEXT: vpxor {{.*}}(%rip), %xmm0, %xmm0
1808 ; X64-AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
1809 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
1810 ; X64-AVX-NEXT: setne %al
1811 ; X64-AVX-NEXT: retq
1813 ; X64-MIC-AVX-LABEL: length24_eq_const:
1814 ; X64-MIC-AVX: # %bb.0:
1815 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
1816 ; X64-MIC-AVX-NEXT: vmovq {{.*#+}} xmm1 = mem[0],zero
1817 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} xmm2 = [959985462,858927408,0,0]
1818 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm1, %k0
1819 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} xmm1 = [858927408,926299444,825243960,892613426]
1820 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
1821 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
1822 ; X64-MIC-AVX-NEXT: setne %al
1823 ; X64-MIC-AVX-NEXT: vzeroupper
1824 ; X64-MIC-AVX-NEXT: retq
1825 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 24) nounwind
1826 %c = icmp ne i32 %m, 0
1832 ; X86: # %bb.0:
1833 ; X86-NEXT: pushl $0
1835 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1836 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1841 ; X64-LABEL: length31:
1842 ; X64: # %bb.0:
1843 ; X64-NEXT: movl $31, %edx
1844 ; X64-NEXT: jmp memcmp # TAILCALL
1851 ; X86-NOSSE: # %bb.0:
1852 ; X86-NOSSE-NEXT: pushl $0
1854 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1855 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
1863 ; X86-SSE1: # %bb.0:
1864 ; X86-SSE1-NEXT: pushl $0
1866 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1867 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
1875 ; X86-SSE2: # %bb.0:
1876 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1877 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
1886 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1891 ; X86-SSE41: # %bb.0:
1892 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
1893 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %ecx
1905 ; X64-SSE2-LABEL: length31_eq:
1906 ; X64-SSE2: # %bb.0:
1907 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
1908 ; X64-SSE2-NEXT: movdqu 15(%rdi), %xmm1
1909 ; X64-SSE2-NEXT: movdqu (%rsi), %xmm2
1910 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm2
1911 ; X64-SSE2-NEXT: movdqu 15(%rsi), %xmm0
1912 ; X64-SSE2-NEXT: pcmpeqb %xmm1, %xmm0
1913 ; X64-SSE2-NEXT: pand %xmm2, %xmm0
1914 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
1915 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
1916 ; X64-SSE2-NEXT: sete %al
1917 ; X64-SSE2-NEXT: retq
1919 ; X64-SSE41-LABEL: length31_eq:
1920 ; X64-SSE41: # %bb.0:
1921 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
1922 ; X64-SSE41-NEXT: movdqu 15(%rdi), %xmm1
1923 ; X64-SSE41-NEXT: movdqu (%rsi), %xmm2
1924 ; X64-SSE41-NEXT: pxor %xmm0, %xmm2
1925 ; X64-SSE41-NEXT: movdqu 15(%rsi), %xmm0
1926 ; X64-SSE41-NEXT: pxor %xmm1, %xmm0
1927 ; X64-SSE41-NEXT: por %xmm2, %xmm0
1928 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
1929 ; X64-SSE41-NEXT: sete %al
1930 ; X64-SSE41-NEXT: retq
1932 ; X64-AVX-LABEL: length31_eq:
1933 ; X64-AVX: # %bb.0:
1934 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
1935 ; X64-AVX-NEXT: vmovdqu 15(%rdi), %xmm1
1936 ; X64-AVX-NEXT: vpxor 15(%rsi), %xmm1, %xmm1
1937 ; X64-AVX-NEXT: vpxor (%rsi), %xmm0, %xmm0
1938 ; X64-AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
1939 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
1940 ; X64-AVX-NEXT: sete %al
1941 ; X64-AVX-NEXT: retq
1943 ; X64-MIC-AVX-LABEL: length31_eq:
1944 ; X64-MIC-AVX: # %bb.0:
1945 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
1946 ; X64-MIC-AVX-NEXT: vmovdqu 15(%rdi), %xmm1
1947 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %xmm2
1948 ; X64-MIC-AVX-NEXT: vmovdqu 15(%rsi), %xmm3
1949 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm3, %zmm1, %k0
1950 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm0, %k1
1951 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
1952 ; X64-MIC-AVX-NEXT: sete %al
1953 ; X64-MIC-AVX-NEXT: vzeroupper
1954 ; X64-MIC-AVX-NEXT: retq
1956 %cmp = icmp eq i32 %call, 0
1962 ; X86: # %bb.0:
1963 ; X86-NEXT: pushl $0
1965 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1966 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1973 ; X64-LABEL: length31_lt:
1974 ; X64: # %bb.0:
1975 ; X64-NEXT: pushq %rax
1976 ; X64-NEXT: movl $31, %edx
1977 ; X64-NEXT: callq memcmp
1978 ; X64-NEXT: shrl $31, %eax
1979 ; X64-NEXT: # kill: def $al killed $al killed $eax
1980 ; X64-NEXT: popq %rcx
1981 ; X64-NEXT: retq
1983 %cmp = icmp slt i32 %call, 0
1989 ; X86: # %bb.0:
1990 ; X86-NEXT: pushl $0
1992 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1993 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2000 ; X64-LABEL: length31_gt:
2001 ; X64: # %bb.0:
2002 ; X64-NEXT: pushq %rax
2003 ; X64-NEXT: movl $31, %edx
2004 ; X64-NEXT: callq memcmp
2005 ; X64-NEXT: testl %eax, %eax
2006 ; X64-NEXT: setg %al
2007 ; X64-NEXT: popq %rcx
2008 ; X64-NEXT: retq
2010 %cmp = icmp sgt i32 %call, 0
2016 ; X86-NOSSE: # %bb.0:
2017 ; X86-NOSSE-NEXT: pushl $0
2019 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2020 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2028 ; X86-SSE1: # %bb.0:
2029 ; X86-SSE1-NEXT: pushl $0
2031 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2032 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2040 ; X86-SSE2: # %bb.0:
2041 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
2042 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
2051 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2056 ; X86-SSE41: # %bb.0:
2057 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
2058 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %ecx
2070 ; X64-SSE2-LABEL: length31_eq_prefer128:
2071 ; X64-SSE2: # %bb.0:
2072 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
2073 ; X64-SSE2-NEXT: movdqu 15(%rdi), %xmm1
2074 ; X64-SSE2-NEXT: movdqu (%rsi), %xmm2
2075 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm2
2076 ; X64-SSE2-NEXT: movdqu 15(%rsi), %xmm0
2077 ; X64-SSE2-NEXT: pcmpeqb %xmm1, %xmm0
2078 ; X64-SSE2-NEXT: pand %xmm2, %xmm0
2079 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
2080 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2081 ; X64-SSE2-NEXT: sete %al
2082 ; X64-SSE2-NEXT: retq
2084 ; X64-SSE41-LABEL: length31_eq_prefer128:
2085 ; X64-SSE41: # %bb.0:
2086 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
2087 ; X64-SSE41-NEXT: movdqu 15(%rdi), %xmm1
2088 ; X64-SSE41-NEXT: movdqu (%rsi), %xmm2
2089 ; X64-SSE41-NEXT: pxor %xmm0, %xmm2
2090 ; X64-SSE41-NEXT: movdqu 15(%rsi), %xmm0
2091 ; X64-SSE41-NEXT: pxor %xmm1, %xmm0
2092 ; X64-SSE41-NEXT: por %xmm2, %xmm0
2093 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
2094 ; X64-SSE41-NEXT: sete %al
2095 ; X64-SSE41-NEXT: retq
2097 ; X64-AVX-LABEL: length31_eq_prefer128:
2098 ; X64-AVX: # %bb.0:
2099 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
2100 ; X64-AVX-NEXT: vmovdqu 15(%rdi), %xmm1
2101 ; X64-AVX-NEXT: vpxor 15(%rsi), %xmm1, %xmm1
2102 ; X64-AVX-NEXT: vpxor (%rsi), %xmm0, %xmm0
2103 ; X64-AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
2104 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
2105 ; X64-AVX-NEXT: sete %al
2106 ; X64-AVX-NEXT: retq
2108 ; X64-MIC-AVX-LABEL: length31_eq_prefer128:
2109 ; X64-MIC-AVX: # %bb.0:
2110 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
2111 ; X64-MIC-AVX-NEXT: vmovdqu 15(%rdi), %xmm1
2112 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %xmm2
2113 ; X64-MIC-AVX-NEXT: vmovdqu 15(%rsi), %xmm3
2114 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm3, %zmm1, %k0
2115 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm0, %k1
2116 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
2117 ; X64-MIC-AVX-NEXT: sete %al
2118 ; X64-MIC-AVX-NEXT: vzeroupper
2119 ; X64-MIC-AVX-NEXT: retq
2121 %cmp = icmp eq i32 %call, 0
2127 ; X86-NOSSE: # %bb.0:
2128 ; X86-NOSSE-NEXT: pushl $0
2131 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2139 ; X86-SSE1: # %bb.0:
2140 ; X86-SSE1-NEXT: pushl $0
2143 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2151 ; X86-SSE2: # %bb.0:
2152 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
2159 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2164 ; X86-SSE41: # %bb.0:
2165 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
2175 ; X64-SSE2-LABEL: length31_eq_const:
2176 ; X64-SSE2: # %bb.0:
2177 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
2178 ; X64-SSE2-NEXT: movdqu 15(%rdi), %xmm1
2179 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm1
2180 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm0
2181 ; X64-SSE2-NEXT: pand %xmm1, %xmm0
2182 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
2183 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2184 ; X64-SSE2-NEXT: setne %al
2185 ; X64-SSE2-NEXT: retq
2187 ; X64-SSE41-LABEL: length31_eq_const:
2188 ; X64-SSE41: # %bb.0:
2189 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
2190 ; X64-SSE41-NEXT: movdqu 15(%rdi), %xmm1
2191 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm1
2192 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm0
2193 ; X64-SSE41-NEXT: por %xmm1, %xmm0
2194 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
2195 ; X64-SSE41-NEXT: setne %al
2196 ; X64-SSE41-NEXT: retq
2198 ; X64-AVX-LABEL: length31_eq_const:
2199 ; X64-AVX: # %bb.0:
2200 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
2201 ; X64-AVX-NEXT: vmovdqu 15(%rdi), %xmm1
2202 ; X64-AVX-NEXT: vpxor {{.*}}(%rip), %xmm1, %xmm1
2203 ; X64-AVX-NEXT: vpxor {{.*}}(%rip), %xmm0, %xmm0
2204 ; X64-AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
2205 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
2206 ; X64-AVX-NEXT: setne %al
2207 ; X64-AVX-NEXT: retq
2209 ; X64-MIC-AVX-LABEL: length31_eq_const:
2210 ; X64-MIC-AVX: # %bb.0:
2211 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
2212 ; X64-MIC-AVX-NEXT: vmovdqu 15(%rdi), %xmm1
2213 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} xmm2 = [943142453,842084409,909456435,809056311]
2214 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm1, %k0
2215 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} xmm1 = [858927408,926299444,825243960,892613426]
2216 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
2217 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
2218 ; X64-MIC-AVX-NEXT: setne %al
2219 ; X64-MIC-AVX-NEXT: vzeroupper
2220 ; X64-MIC-AVX-NEXT: retq
2221 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 31) nounwind
2222 %c = icmp ne i32 %m, 0
2228 ; X86: # %bb.0:
2229 ; X86-NEXT: pushl $0
2231 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2232 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2237 ; X64-LABEL: length32:
2238 ; X64: # %bb.0:
2239 ; X64-NEXT: movl $32, %edx
2240 ; X64-NEXT: jmp memcmp # TAILCALL
2249 ; X86-NOSSE: # %bb.0:
2250 ; X86-NOSSE-NEXT: pushl $0
2252 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2253 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2261 ; X86-SSE1: # %bb.0:
2262 ; X86-SSE1-NEXT: pushl $0
2264 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2265 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2273 ; X86-SSE2: # %bb.0:
2274 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
2275 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
2284 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2289 ; X86-SSE41: # %bb.0:
2290 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
2291 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %ecx
2303 ; X64-SSE2-LABEL: length32_eq:
2304 ; X64-SSE2: # %bb.0:
2305 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
2306 ; X64-SSE2-NEXT: movdqu 16(%rdi), %xmm1
2307 ; X64-SSE2-NEXT: movdqu (%rsi), %xmm2
2308 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm2
2309 ; X64-SSE2-NEXT: movdqu 16(%rsi), %xmm0
2310 ; X64-SSE2-NEXT: pcmpeqb %xmm1, %xmm0
2311 ; X64-SSE2-NEXT: pand %xmm2, %xmm0
2312 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
2313 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2314 ; X64-SSE2-NEXT: sete %al
2315 ; X64-SSE2-NEXT: retq
2317 ; X64-SSE41-LABEL: length32_eq:
2318 ; X64-SSE41: # %bb.0:
2319 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
2320 ; X64-SSE41-NEXT: movdqu 16(%rdi), %xmm1
2321 ; X64-SSE41-NEXT: movdqu (%rsi), %xmm2
2322 ; X64-SSE41-NEXT: pxor %xmm0, %xmm2
2323 ; X64-SSE41-NEXT: movdqu 16(%rsi), %xmm0
2324 ; X64-SSE41-NEXT: pxor %xmm1, %xmm0
2325 ; X64-SSE41-NEXT: por %xmm2, %xmm0
2326 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
2327 ; X64-SSE41-NEXT: sete %al
2328 ; X64-SSE41-NEXT: retq
2330 ; X64-AVX1-LABEL: length32_eq:
2331 ; X64-AVX1: # %bb.0:
2332 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
2333 ; X64-AVX1-NEXT: vxorps (%rsi), %ymm0, %ymm0
2334 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
2335 ; X64-AVX1-NEXT: sete %al
2336 ; X64-AVX1-NEXT: vzeroupper
2337 ; X64-AVX1-NEXT: retq
2339 ; X64-AVX2-LABEL: length32_eq:
2340 ; X64-AVX2: # %bb.0:
2341 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
2342 ; X64-AVX2-NEXT: vpxor (%rsi), %ymm0, %ymm0
2343 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
2344 ; X64-AVX2-NEXT: sete %al
2345 ; X64-AVX2-NEXT: vzeroupper
2346 ; X64-AVX2-NEXT: retq
2348 ; X64-AVX512-LABEL: length32_eq:
2349 ; X64-AVX512: # %bb.0:
2350 ; X64-AVX512-NEXT: vmovdqu (%rdi), %ymm0
2351 ; X64-AVX512-NEXT: vpxor (%rsi), %ymm0, %ymm0
2352 ; X64-AVX512-NEXT: vptest %ymm0, %ymm0
2353 ; X64-AVX512-NEXT: sete %al
2354 ; X64-AVX512-NEXT: vzeroupper
2355 ; X64-AVX512-NEXT: retq
2357 ; X64-MIC-AVX-LABEL: length32_eq:
2358 ; X64-MIC-AVX: # %bb.0:
2359 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %ymm0
2360 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %ymm1
2361 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k0
2362 ; X64-MIC-AVX-NEXT: kortestw %k0, %k0
2363 ; X64-MIC-AVX-NEXT: sete %al
2364 ; X64-MIC-AVX-NEXT: vzeroupper
2365 ; X64-MIC-AVX-NEXT: retq
2367 %cmp = icmp eq i32 %call, 0
2373 ; X86: # %bb.0:
2374 ; X86-NEXT: pushl $0
2376 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2377 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2384 ; X64-LABEL: length32_lt:
2385 ; X64: # %bb.0:
2386 ; X64-NEXT: pushq %rax
2387 ; X64-NEXT: movl $32, %edx
2388 ; X64-NEXT: callq memcmp
2389 ; X64-NEXT: shrl $31, %eax
2390 ; X64-NEXT: # kill: def $al killed $al killed $eax
2391 ; X64-NEXT: popq %rcx
2392 ; X64-NEXT: retq
2394 %cmp = icmp slt i32 %call, 0
2400 ; X86: # %bb.0:
2401 ; X86-NEXT: pushl $0
2403 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2404 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2411 ; X64-LABEL: length32_gt:
2412 ; X64: # %bb.0:
2413 ; X64-NEXT: pushq %rax
2414 ; X64-NEXT: movl $32, %edx
2415 ; X64-NEXT: callq memcmp
2416 ; X64-NEXT: testl %eax, %eax
2417 ; X64-NEXT: setg %al
2418 ; X64-NEXT: popq %rcx
2419 ; X64-NEXT: retq
2421 %cmp = icmp sgt i32 %call, 0
2427 ; X86-NOSSE: # %bb.0:
2428 ; X86-NOSSE-NEXT: pushl $0
2430 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2431 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2439 ; X86-SSE1: # %bb.0:
2440 ; X86-SSE1-NEXT: pushl $0
2442 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2443 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2451 ; X86-SSE2: # %bb.0:
2452 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
2453 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
2462 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2467 ; X86-SSE41: # %bb.0:
2468 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
2469 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %ecx
2481 ; X64-SSE2-LABEL: length32_eq_prefer128:
2482 ; X64-SSE2: # %bb.0:
2483 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
2484 ; X64-SSE2-NEXT: movdqu 16(%rdi), %xmm1
2485 ; X64-SSE2-NEXT: movdqu (%rsi), %xmm2
2486 ; X64-SSE2-NEXT: pcmpeqb %xmm0, %xmm2
2487 ; X64-SSE2-NEXT: movdqu 16(%rsi), %xmm0
2488 ; X64-SSE2-NEXT: pcmpeqb %xmm1, %xmm0
2489 ; X64-SSE2-NEXT: pand %xmm2, %xmm0
2490 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
2491 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2492 ; X64-SSE2-NEXT: sete %al
2493 ; X64-SSE2-NEXT: retq
2495 ; X64-SSE41-LABEL: length32_eq_prefer128:
2496 ; X64-SSE41: # %bb.0:
2497 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
2498 ; X64-SSE41-NEXT: movdqu 16(%rdi), %xmm1
2499 ; X64-SSE41-NEXT: movdqu (%rsi), %xmm2
2500 ; X64-SSE41-NEXT: pxor %xmm0, %xmm2
2501 ; X64-SSE41-NEXT: movdqu 16(%rsi), %xmm0
2502 ; X64-SSE41-NEXT: pxor %xmm1, %xmm0
2503 ; X64-SSE41-NEXT: por %xmm2, %xmm0
2504 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
2505 ; X64-SSE41-NEXT: sete %al
2506 ; X64-SSE41-NEXT: retq
2508 ; X64-AVX-LABEL: length32_eq_prefer128:
2509 ; X64-AVX: # %bb.0:
2510 ; X64-AVX-NEXT: vmovdqu (%rdi), %xmm0
2511 ; X64-AVX-NEXT: vmovdqu 16(%rdi), %xmm1
2512 ; X64-AVX-NEXT: vpxor 16(%rsi), %xmm1, %xmm1
2513 ; X64-AVX-NEXT: vpxor (%rsi), %xmm0, %xmm0
2514 ; X64-AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
2515 ; X64-AVX-NEXT: vptest %xmm0, %xmm0
2516 ; X64-AVX-NEXT: sete %al
2517 ; X64-AVX-NEXT: retq
2519 ; X64-MIC-AVX-LABEL: length32_eq_prefer128:
2520 ; X64-MIC-AVX: # %bb.0:
2521 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %xmm0
2522 ; X64-MIC-AVX-NEXT: vmovdqu 16(%rdi), %xmm1
2523 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %xmm2
2524 ; X64-MIC-AVX-NEXT: vmovdqu 16(%rsi), %xmm3
2525 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm3, %zmm1, %k0
2526 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm0, %k1
2527 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
2528 ; X64-MIC-AVX-NEXT: sete %al
2529 ; X64-MIC-AVX-NEXT: vzeroupper
2530 ; X64-MIC-AVX-NEXT: retq
2532 %cmp = icmp eq i32 %call, 0
2538 ; X86-NOSSE: # %bb.0:
2539 ; X86-NOSSE-NEXT: pushl $0
2542 ; X86-NOSSE-NEXT: pushl {{[0-9]+}}(%esp)
2550 ; X86-SSE1: # %bb.0:
2551 ; X86-SSE1-NEXT: pushl $0
2554 ; X86-SSE1-NEXT: pushl {{[0-9]+}}(%esp)
2562 ; X86-SSE2: # %bb.0:
2563 ; X86-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
2570 ; X86-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2575 ; X86-SSE41: # %bb.0:
2576 ; X86-SSE41-NEXT: movl {{[0-9]+}}(%esp), %eax
2586 ; X64-SSE2-LABEL: length32_eq_const:
2587 ; X64-SSE2: # %bb.0:
2588 ; X64-SSE2-NEXT: movdqu (%rdi), %xmm0
2589 ; X64-SSE2-NEXT: movdqu 16(%rdi), %xmm1
2590 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm1
2591 ; X64-SSE2-NEXT: pcmpeqb {{.*}}(%rip), %xmm0
2592 ; X64-SSE2-NEXT: pand %xmm1, %xmm0
2593 ; X64-SSE2-NEXT: pmovmskb %xmm0, %eax
2594 ; X64-SSE2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
2595 ; X64-SSE2-NEXT: setne %al
2596 ; X64-SSE2-NEXT: retq
2598 ; X64-SSE41-LABEL: length32_eq_const:
2599 ; X64-SSE41: # %bb.0:
2600 ; X64-SSE41-NEXT: movdqu (%rdi), %xmm0
2601 ; X64-SSE41-NEXT: movdqu 16(%rdi), %xmm1
2602 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm1
2603 ; X64-SSE41-NEXT: pxor {{.*}}(%rip), %xmm0
2604 ; X64-SSE41-NEXT: por %xmm1, %xmm0
2605 ; X64-SSE41-NEXT: ptest %xmm0, %xmm0
2606 ; X64-SSE41-NEXT: setne %al
2607 ; X64-SSE41-NEXT: retq
2609 ; X64-AVX1-LABEL: length32_eq_const:
2610 ; X64-AVX1: # %bb.0:
2611 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
2612 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm0, %ymm0
2613 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
2614 ; X64-AVX1-NEXT: setne %al
2615 ; X64-AVX1-NEXT: vzeroupper
2616 ; X64-AVX1-NEXT: retq
2618 ; X64-AVX2-LABEL: length32_eq_const:
2619 ; X64-AVX2: # %bb.0:
2620 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
2621 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
2622 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
2623 ; X64-AVX2-NEXT: setne %al
2624 ; X64-AVX2-NEXT: vzeroupper
2625 ; X64-AVX2-NEXT: retq
2627 ; X64-AVX512-LABEL: length32_eq_const:
2628 ; X64-AVX512: # %bb.0:
2629 ; X64-AVX512-NEXT: vmovdqu (%rdi), %ymm0
2630 ; X64-AVX512-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
2631 ; X64-AVX512-NEXT: vptest %ymm0, %ymm0
2632 ; X64-AVX512-NEXT: setne %al
2633 ; X64-AVX512-NEXT: vzeroupper
2634 ; X64-AVX512-NEXT: retq
2636 ; X64-MIC-AVX-LABEL: length32_eq_const:
2637 ; X64-MIC-AVX: # %bb.0:
2638 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %ymm0
2639 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} ymm1 = [858927408,926299444,825243960,892613426,959985462,8…
2640 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k0
2641 ; X64-MIC-AVX-NEXT: kortestw %k0, %k0
2642 ; X64-MIC-AVX-NEXT: setne %al
2643 ; X64-MIC-AVX-NEXT: vzeroupper
2644 ; X64-MIC-AVX-NEXT: retq
2645 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 32) nounwind
2646 %c = icmp ne i32 %m, 0
2652 ; X86: # %bb.0:
2653 ; X86-NEXT: pushl $0
2655 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2656 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2661 ; X64-LABEL: length48:
2662 ; X64: # %bb.0:
2663 ; X64-NEXT: movl $48, %edx
2664 ; X64-NEXT: jmp memcmp # TAILCALL
2671 ; X86: # %bb.0:
2672 ; X86-NEXT: pushl $0
2674 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2675 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2682 ; X64-SSE-LABEL: length48_eq:
2683 ; X64-SSE: # %bb.0:
2684 ; X64-SSE-NEXT: pushq %rax
2685 ; X64-SSE-NEXT: movl $48, %edx
2686 ; X64-SSE-NEXT: callq memcmp
2687 ; X64-SSE-NEXT: testl %eax, %eax
2688 ; X64-SSE-NEXT: sete %al
2689 ; X64-SSE-NEXT: popq %rcx
2690 ; X64-SSE-NEXT: retq
2692 ; X64-AVX1-LABEL: length48_eq:
2693 ; X64-AVX1: # %bb.0:
2694 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
2695 ; X64-AVX1-NEXT: vmovups 32(%rdi), %xmm1
2696 ; X64-AVX1-NEXT: vmovups 32(%rsi), %xmm2
2697 ; X64-AVX1-NEXT: vxorps (%rsi), %ymm0, %ymm0
2698 ; X64-AVX1-NEXT: vxorps %ymm2, %ymm1, %ymm1
2699 ; X64-AVX1-NEXT: vorps %ymm1, %ymm0, %ymm0
2700 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
2701 ; X64-AVX1-NEXT: sete %al
2702 ; X64-AVX1-NEXT: vzeroupper
2703 ; X64-AVX1-NEXT: retq
2705 ; X64-AVX2-LABEL: length48_eq:
2706 ; X64-AVX2: # %bb.0:
2707 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
2708 ; X64-AVX2-NEXT: vmovdqu 32(%rdi), %xmm1
2709 ; X64-AVX2-NEXT: vmovdqu 32(%rsi), %xmm2
2710 ; X64-AVX2-NEXT: vpxor (%rsi), %ymm0, %ymm0
2711 ; X64-AVX2-NEXT: vpxor %ymm2, %ymm1, %ymm1
2712 ; X64-AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
2713 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
2714 ; X64-AVX2-NEXT: sete %al
2715 ; X64-AVX2-NEXT: vzeroupper
2716 ; X64-AVX2-NEXT: retq
2718 ; X64-AVX512-LABEL: length48_eq:
2719 ; X64-AVX512: # %bb.0:
2720 ; X64-AVX512-NEXT: vmovdqu (%rdi), %ymm0
2721 ; X64-AVX512-NEXT: vmovdqu 32(%rdi), %xmm1
2722 ; X64-AVX512-NEXT: vmovdqu 32(%rsi), %xmm2
2723 ; X64-AVX512-NEXT: vpxor (%rsi), %ymm0, %ymm0
2724 ; X64-AVX512-NEXT: vpxor %ymm2, %ymm1, %ymm1
2725 ; X64-AVX512-NEXT: vpor %ymm1, %ymm0, %ymm0
2726 ; X64-AVX512-NEXT: vptest %ymm0, %ymm0
2727 ; X64-AVX512-NEXT: sete %al
2728 ; X64-AVX512-NEXT: vzeroupper
2729 ; X64-AVX512-NEXT: retq
2731 ; X64-MIC-AVX-LABEL: length48_eq:
2732 ; X64-MIC-AVX: # %bb.0:
2733 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %ymm0
2734 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %ymm1
2735 ; X64-MIC-AVX-NEXT: vmovdqu 32(%rdi), %xmm2
2736 ; X64-MIC-AVX-NEXT: vmovdqu 32(%rsi), %xmm3
2737 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm3, %zmm2, %k0
2738 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
2739 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
2740 ; X64-MIC-AVX-NEXT: sete %al
2741 ; X64-MIC-AVX-NEXT: vzeroupper
2742 ; X64-MIC-AVX-NEXT: retq
2744 %cmp = icmp eq i32 %call, 0
2750 ; X86: # %bb.0:
2751 ; X86-NEXT: pushl $0
2753 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2754 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2761 ; X64-LABEL: length48_lt:
2762 ; X64: # %bb.0:
2763 ; X64-NEXT: pushq %rax
2764 ; X64-NEXT: movl $48, %edx
2765 ; X64-NEXT: callq memcmp
2766 ; X64-NEXT: shrl $31, %eax
2767 ; X64-NEXT: # kill: def $al killed $al killed $eax
2768 ; X64-NEXT: popq %rcx
2769 ; X64-NEXT: retq
2771 %cmp = icmp slt i32 %call, 0
2777 ; X86: # %bb.0:
2778 ; X86-NEXT: pushl $0
2780 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2781 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2788 ; X64-LABEL: length48_gt:
2789 ; X64: # %bb.0:
2790 ; X64-NEXT: pushq %rax
2791 ; X64-NEXT: movl $48, %edx
2792 ; X64-NEXT: callq memcmp
2793 ; X64-NEXT: testl %eax, %eax
2794 ; X64-NEXT: setg %al
2795 ; X64-NEXT: popq %rcx
2796 ; X64-NEXT: retq
2798 %cmp = icmp sgt i32 %call, 0
2804 ; X86: # %bb.0:
2805 ; X86-NEXT: pushl $0
2807 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2808 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2815 ; X64-LABEL: length48_eq_prefer128:
2816 ; X64: # %bb.0:
2817 ; X64-NEXT: pushq %rax
2818 ; X64-NEXT: movl $48, %edx
2819 ; X64-NEXT: callq memcmp
2820 ; X64-NEXT: testl %eax, %eax
2821 ; X64-NEXT: sete %al
2822 ; X64-NEXT: popq %rcx
2823 ; X64-NEXT: retq
2825 %cmp = icmp eq i32 %call, 0
2831 ; X86: # %bb.0:
2832 ; X86-NEXT: pushl $0
2835 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2842 ; X64-SSE-LABEL: length48_eq_const:
2843 ; X64-SSE: # %bb.0:
2844 ; X64-SSE-NEXT: pushq %rax
2845 ; X64-SSE-NEXT: movl $.L.str, %esi
2846 ; X64-SSE-NEXT: movl $48, %edx
2847 ; X64-SSE-NEXT: callq memcmp
2848 ; X64-SSE-NEXT: testl %eax, %eax
2849 ; X64-SSE-NEXT: setne %al
2850 ; X64-SSE-NEXT: popq %rcx
2851 ; X64-SSE-NEXT: retq
2853 ; X64-AVX1-LABEL: length48_eq_const:
2854 ; X64-AVX1: # %bb.0:
2855 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
2856 ; X64-AVX1-NEXT: vmovups 32(%rdi), %xmm1
2857 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm0, %ymm0
2858 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm1, %ymm1
2859 ; X64-AVX1-NEXT: vorps %ymm1, %ymm0, %ymm0
2860 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
2861 ; X64-AVX1-NEXT: setne %al
2862 ; X64-AVX1-NEXT: vzeroupper
2863 ; X64-AVX1-NEXT: retq
2865 ; X64-AVX2-LABEL: length48_eq_const:
2866 ; X64-AVX2: # %bb.0:
2867 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
2868 ; X64-AVX2-NEXT: vmovdqu 32(%rdi), %xmm1
2869 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
2870 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm1, %ymm1
2871 ; X64-AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
2872 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
2873 ; X64-AVX2-NEXT: setne %al
2874 ; X64-AVX2-NEXT: vzeroupper
2875 ; X64-AVX2-NEXT: retq
2877 ; X64-AVX512-LABEL: length48_eq_const:
2878 ; X64-AVX512: # %bb.0:
2879 ; X64-AVX512-NEXT: vmovdqu (%rdi), %ymm0
2880 ; X64-AVX512-NEXT: vmovdqu 32(%rdi), %xmm1
2881 ; X64-AVX512-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
2882 ; X64-AVX512-NEXT: vpxor {{.*}}(%rip), %ymm1, %ymm1
2883 ; X64-AVX512-NEXT: vpor %ymm1, %ymm0, %ymm0
2884 ; X64-AVX512-NEXT: vptest %ymm0, %ymm0
2885 ; X64-AVX512-NEXT: setne %al
2886 ; X64-AVX512-NEXT: vzeroupper
2887 ; X64-AVX512-NEXT: retq
2889 ; X64-MIC-AVX-LABEL: length48_eq_const:
2890 ; X64-MIC-AVX: # %bb.0:
2891 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %ymm0
2892 ; X64-MIC-AVX-NEXT: vmovdqu 32(%rdi), %xmm1
2893 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} ymm2 = [892613426,959985462,858927408,926299444,0,0,0,0]
2894 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm1, %k0
2895 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} ymm1 = [858927408,926299444,825243960,892613426,959985462,8…
2896 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
2897 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
2898 ; X64-MIC-AVX-NEXT: setne %al
2899 ; X64-MIC-AVX-NEXT: vzeroupper
2900 ; X64-MIC-AVX-NEXT: retq
2901 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 48) nounwind
2902 %c = icmp ne i32 %m, 0
2908 ; X86: # %bb.0:
2909 ; X86-NEXT: pushl $0
2911 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2912 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2917 ; X64-LABEL: length63:
2918 ; X64: # %bb.0:
2919 ; X64-NEXT: movl $63, %edx
2920 ; X64-NEXT: jmp memcmp # TAILCALL
2927 ; X86: # %bb.0:
2928 ; X86-NEXT: pushl $0
2930 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2931 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
2938 ; X64-SSE-LABEL: length63_eq:
2939 ; X64-SSE: # %bb.0:
2940 ; X64-SSE-NEXT: pushq %rax
2941 ; X64-SSE-NEXT: movl $63, %edx
2942 ; X64-SSE-NEXT: callq memcmp
2943 ; X64-SSE-NEXT: testl %eax, %eax
2944 ; X64-SSE-NEXT: setne %al
2945 ; X64-SSE-NEXT: popq %rcx
2946 ; X64-SSE-NEXT: retq
2948 ; X64-AVX1-LABEL: length63_eq:
2949 ; X64-AVX1: # %bb.0:
2950 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
2951 ; X64-AVX1-NEXT: vmovups 31(%rdi), %ymm1
2952 ; X64-AVX1-NEXT: vxorps 31(%rsi), %ymm1, %ymm1
2953 ; X64-AVX1-NEXT: vxorps (%rsi), %ymm0, %ymm0
2954 ; X64-AVX1-NEXT: vorps %ymm1, %ymm0, %ymm0
2955 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
2956 ; X64-AVX1-NEXT: setne %al
2957 ; X64-AVX1-NEXT: vzeroupper
2958 ; X64-AVX1-NEXT: retq
2960 ; X64-AVX2-LABEL: length63_eq:
2961 ; X64-AVX2: # %bb.0:
2962 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
2963 ; X64-AVX2-NEXT: vmovdqu 31(%rdi), %ymm1
2964 ; X64-AVX2-NEXT: vpxor 31(%rsi), %ymm1, %ymm1
2965 ; X64-AVX2-NEXT: vpxor (%rsi), %ymm0, %ymm0
2966 ; X64-AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
2967 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
2968 ; X64-AVX2-NEXT: setne %al
2969 ; X64-AVX2-NEXT: vzeroupper
2970 ; X64-AVX2-NEXT: retq
2972 ; X64-AVX512-LABEL: length63_eq:
2973 ; X64-AVX512: # %bb.0:
2974 ; X64-AVX512-NEXT: vmovdqu (%rdi), %ymm0
2975 ; X64-AVX512-NEXT: vmovdqu 31(%rdi), %ymm1
2976 ; X64-AVX512-NEXT: vpxor 31(%rsi), %ymm1, %ymm1
2977 ; X64-AVX512-NEXT: vpxor (%rsi), %ymm0, %ymm0
2978 ; X64-AVX512-NEXT: vpor %ymm1, %ymm0, %ymm0
2979 ; X64-AVX512-NEXT: vptest %ymm0, %ymm0
2980 ; X64-AVX512-NEXT: setne %al
2981 ; X64-AVX512-NEXT: vzeroupper
2982 ; X64-AVX512-NEXT: retq
2984 ; X64-MIC-AVX-LABEL: length63_eq:
2985 ; X64-MIC-AVX: # %bb.0:
2986 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %ymm0
2987 ; X64-MIC-AVX-NEXT: vmovdqu 31(%rdi), %ymm1
2988 ; X64-MIC-AVX-NEXT: vmovdqu (%rsi), %ymm2
2989 ; X64-MIC-AVX-NEXT: vmovdqu 31(%rsi), %ymm3
2990 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm3, %zmm1, %k0
2991 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm0, %k1
2992 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
2993 ; X64-MIC-AVX-NEXT: setne %al
2994 ; X64-MIC-AVX-NEXT: vzeroupper
2995 ; X64-MIC-AVX-NEXT: retq
2997 %cmp = icmp ne i32 %call, 0
3003 ; X86: # %bb.0:
3004 ; X86-NEXT: pushl $0
3006 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3007 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3014 ; X64-LABEL: length63_lt:
3015 ; X64: # %bb.0:
3016 ; X64-NEXT: pushq %rax
3017 ; X64-NEXT: movl $63, %edx
3018 ; X64-NEXT: callq memcmp
3019 ; X64-NEXT: shrl $31, %eax
3020 ; X64-NEXT: # kill: def $al killed $al killed $eax
3021 ; X64-NEXT: popq %rcx
3022 ; X64-NEXT: retq
3024 %cmp = icmp slt i32 %call, 0
3030 ; X86: # %bb.0:
3031 ; X86-NEXT: pushl $0
3033 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3034 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3041 ; X64-LABEL: length63_gt:
3042 ; X64: # %bb.0:
3043 ; X64-NEXT: pushq %rax
3044 ; X64-NEXT: movl $63, %edx
3045 ; X64-NEXT: callq memcmp
3046 ; X64-NEXT: testl %eax, %eax
3047 ; X64-NEXT: setg %al
3048 ; X64-NEXT: popq %rcx
3049 ; X64-NEXT: retq
3051 %cmp = icmp sgt i32 %call, 0
3057 ; X86: # %bb.0:
3058 ; X86-NEXT: pushl $0
3061 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3068 ; X64-SSE-LABEL: length63_eq_const:
3069 ; X64-SSE: # %bb.0:
3070 ; X64-SSE-NEXT: pushq %rax
3071 ; X64-SSE-NEXT: movl $.L.str, %esi
3072 ; X64-SSE-NEXT: movl $63, %edx
3073 ; X64-SSE-NEXT: callq memcmp
3074 ; X64-SSE-NEXT: testl %eax, %eax
3075 ; X64-SSE-NEXT: sete %al
3076 ; X64-SSE-NEXT: popq %rcx
3077 ; X64-SSE-NEXT: retq
3079 ; X64-AVX1-LABEL: length63_eq_const:
3080 ; X64-AVX1: # %bb.0:
3081 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
3082 ; X64-AVX1-NEXT: vmovups 31(%rdi), %ymm1
3083 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm1, %ymm1
3084 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm0, %ymm0
3085 ; X64-AVX1-NEXT: vorps %ymm1, %ymm0, %ymm0
3086 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
3087 ; X64-AVX1-NEXT: sete %al
3088 ; X64-AVX1-NEXT: vzeroupper
3089 ; X64-AVX1-NEXT: retq
3091 ; X64-AVX2-LABEL: length63_eq_const:
3092 ; X64-AVX2: # %bb.0:
3093 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
3094 ; X64-AVX2-NEXT: vmovdqu 31(%rdi), %ymm1
3095 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm1, %ymm1
3096 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
3097 ; X64-AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
3098 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
3099 ; X64-AVX2-NEXT: sete %al
3100 ; X64-AVX2-NEXT: vzeroupper
3101 ; X64-AVX2-NEXT: retq
3103 ; X64-AVX512-LABEL: length63_eq_const:
3104 ; X64-AVX512: # %bb.0:
3105 ; X64-AVX512-NEXT: vmovdqu (%rdi), %ymm0
3106 ; X64-AVX512-NEXT: vmovdqu 31(%rdi), %ymm1
3107 ; X64-AVX512-NEXT: vpxor {{.*}}(%rip), %ymm1, %ymm1
3108 ; X64-AVX512-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
3109 ; X64-AVX512-NEXT: vpor %ymm1, %ymm0, %ymm0
3110 ; X64-AVX512-NEXT: vptest %ymm0, %ymm0
3111 ; X64-AVX512-NEXT: sete %al
3112 ; X64-AVX512-NEXT: vzeroupper
3113 ; X64-AVX512-NEXT: retq
3115 ; X64-MIC-AVX-LABEL: length63_eq_const:
3116 ; X64-MIC-AVX: # %bb.0:
3117 ; X64-MIC-AVX-NEXT: vmovdqu (%rdi), %ymm0
3118 ; X64-MIC-AVX-NEXT: vmovdqu 31(%rdi), %ymm1
3119 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} ymm2 = [875770417,943142453,842084409,909456435,809056311,8…
3120 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm2, %zmm1, %k0
3121 ; X64-MIC-AVX-NEXT: vmovdqa {{.*#+}} ymm1 = [858927408,926299444,825243960,892613426,959985462,8…
3122 ; X64-MIC-AVX-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
3123 ; X64-MIC-AVX-NEXT: kortestw %k0, %k1
3124 ; X64-MIC-AVX-NEXT: sete %al
3125 ; X64-MIC-AVX-NEXT: vzeroupper
3126 ; X64-MIC-AVX-NEXT: retq
3127 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 63) nounwind
3128 %c = icmp eq i32 %m, 0
3134 ; X86: # %bb.0:
3135 ; X86-NEXT: pushl $0
3137 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3138 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3143 ; X64-LABEL: length64:
3144 ; X64: # %bb.0:
3145 ; X64-NEXT: movl $64, %edx
3146 ; X64-NEXT: jmp memcmp # TAILCALL
3153 ; X86: # %bb.0:
3154 ; X86-NEXT: pushl $0
3156 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3157 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3164 ; X64-SSE-LABEL: length64_eq:
3165 ; X64-SSE: # %bb.0:
3166 ; X64-SSE-NEXT: pushq %rax
3167 ; X64-SSE-NEXT: movl $64, %edx
3168 ; X64-SSE-NEXT: callq memcmp
3169 ; X64-SSE-NEXT: testl %eax, %eax
3170 ; X64-SSE-NEXT: setne %al
3171 ; X64-SSE-NEXT: popq %rcx
3172 ; X64-SSE-NEXT: retq
3174 ; X64-AVX1-LABEL: length64_eq:
3175 ; X64-AVX1: # %bb.0:
3176 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
3177 ; X64-AVX1-NEXT: vmovups 32(%rdi), %ymm1
3178 ; X64-AVX1-NEXT: vxorps 32(%rsi), %ymm1, %ymm1
3179 ; X64-AVX1-NEXT: vxorps (%rsi), %ymm0, %ymm0
3180 ; X64-AVX1-NEXT: vorps %ymm1, %ymm0, %ymm0
3181 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
3182 ; X64-AVX1-NEXT: setne %al
3183 ; X64-AVX1-NEXT: vzeroupper
3184 ; X64-AVX1-NEXT: retq
3186 ; X64-AVX2-LABEL: length64_eq:
3187 ; X64-AVX2: # %bb.0:
3188 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
3189 ; X64-AVX2-NEXT: vmovdqu 32(%rdi), %ymm1
3190 ; X64-AVX2-NEXT: vpxor 32(%rsi), %ymm1, %ymm1
3191 ; X64-AVX2-NEXT: vpxor (%rsi), %ymm0, %ymm0
3192 ; X64-AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
3193 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
3194 ; X64-AVX2-NEXT: setne %al
3195 ; X64-AVX2-NEXT: vzeroupper
3196 ; X64-AVX2-NEXT: retq
3198 ; X64-AVX512BW-LABEL: length64_eq:
3199 ; X64-AVX512BW: # %bb.0:
3200 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3201 ; X64-AVX512BW-NEXT: vpcmpneqb (%rsi), %zmm0, %k0
3202 ; X64-AVX512BW-NEXT: kortestq %k0, %k0
3203 ; X64-AVX512BW-NEXT: setne %al
3204 ; X64-AVX512BW-NEXT: vzeroupper
3205 ; X64-AVX512BW-NEXT: retq
3207 ; X64-AVX512F-LABEL: length64_eq:
3208 ; X64-AVX512F: # %bb.0:
3209 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3210 ; X64-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k0
3211 ; X64-AVX512F-NEXT: kortestw %k0, %k0
3212 ; X64-AVX512F-NEXT: setne %al
3213 ; X64-AVX512F-NEXT: vzeroupper
3214 ; X64-AVX512F-NEXT: retq
3216 ; X64-MIC-AVX2-LABEL: length64_eq:
3217 ; X64-MIC-AVX2: # %bb.0:
3218 ; X64-MIC-AVX2-NEXT: vmovdqu (%rdi), %ymm0
3219 ; X64-MIC-AVX2-NEXT: vmovdqu 32(%rdi), %ymm1
3220 ; X64-MIC-AVX2-NEXT: vmovdqu (%rsi), %ymm2
3221 ; X64-MIC-AVX2-NEXT: vmovdqu 32(%rsi), %ymm3
3222 ; X64-MIC-AVX2-NEXT: vpcmpneqd %zmm3, %zmm1, %k0
3223 ; X64-MIC-AVX2-NEXT: vpcmpneqd %zmm2, %zmm0, %k1
3224 ; X64-MIC-AVX2-NEXT: kortestw %k0, %k1
3225 ; X64-MIC-AVX2-NEXT: setne %al
3226 ; X64-MIC-AVX2-NEXT: vzeroupper
3227 ; X64-MIC-AVX2-NEXT: retq
3229 ; X64-MIC-AVX512F-LABEL: length64_eq:
3230 ; X64-MIC-AVX512F: # %bb.0:
3231 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3232 ; X64-MIC-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k0
3233 ; X64-MIC-AVX512F-NEXT: kortestw %k0, %k0
3234 ; X64-MIC-AVX512F-NEXT: setne %al
3235 ; X64-MIC-AVX512F-NEXT: vzeroupper
3236 ; X64-MIC-AVX512F-NEXT: retq
3238 %cmp = icmp ne i32 %call, 0
3244 ; X86: # %bb.0:
3245 ; X86-NEXT: pushl $0
3247 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3248 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3255 ; X64-LABEL: length64_lt:
3256 ; X64: # %bb.0:
3257 ; X64-NEXT: pushq %rax
3258 ; X64-NEXT: movl $64, %edx
3259 ; X64-NEXT: callq memcmp
3260 ; X64-NEXT: shrl $31, %eax
3261 ; X64-NEXT: # kill: def $al killed $al killed $eax
3262 ; X64-NEXT: popq %rcx
3263 ; X64-NEXT: retq
3265 %cmp = icmp slt i32 %call, 0
3271 ; X86: # %bb.0:
3272 ; X86-NEXT: pushl $0
3274 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3275 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3282 ; X64-LABEL: length64_gt:
3283 ; X64: # %bb.0:
3284 ; X64-NEXT: pushq %rax
3285 ; X64-NEXT: movl $64, %edx
3286 ; X64-NEXT: callq memcmp
3287 ; X64-NEXT: testl %eax, %eax
3288 ; X64-NEXT: setg %al
3289 ; X64-NEXT: popq %rcx
3290 ; X64-NEXT: retq
3292 %cmp = icmp sgt i32 %call, 0
3298 ; X86: # %bb.0:
3299 ; X86-NEXT: pushl $0
3302 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3309 ; X64-SSE-LABEL: length64_eq_const:
3310 ; X64-SSE: # %bb.0:
3311 ; X64-SSE-NEXT: pushq %rax
3312 ; X64-SSE-NEXT: movl $.L.str, %esi
3313 ; X64-SSE-NEXT: movl $64, %edx
3314 ; X64-SSE-NEXT: callq memcmp
3315 ; X64-SSE-NEXT: testl %eax, %eax
3316 ; X64-SSE-NEXT: sete %al
3317 ; X64-SSE-NEXT: popq %rcx
3318 ; X64-SSE-NEXT: retq
3320 ; X64-AVX1-LABEL: length64_eq_const:
3321 ; X64-AVX1: # %bb.0:
3322 ; X64-AVX1-NEXT: vmovups (%rdi), %ymm0
3323 ; X64-AVX1-NEXT: vmovups 32(%rdi), %ymm1
3324 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm1, %ymm1
3325 ; X64-AVX1-NEXT: vxorps {{.*}}(%rip), %ymm0, %ymm0
3326 ; X64-AVX1-NEXT: vorps %ymm1, %ymm0, %ymm0
3327 ; X64-AVX1-NEXT: vptest %ymm0, %ymm0
3328 ; X64-AVX1-NEXT: sete %al
3329 ; X64-AVX1-NEXT: vzeroupper
3330 ; X64-AVX1-NEXT: retq
3332 ; X64-AVX2-LABEL: length64_eq_const:
3333 ; X64-AVX2: # %bb.0:
3334 ; X64-AVX2-NEXT: vmovdqu (%rdi), %ymm0
3335 ; X64-AVX2-NEXT: vmovdqu 32(%rdi), %ymm1
3336 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm1, %ymm1
3337 ; X64-AVX2-NEXT: vpxor {{.*}}(%rip), %ymm0, %ymm0
3338 ; X64-AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
3339 ; X64-AVX2-NEXT: vptest %ymm0, %ymm0
3340 ; X64-AVX2-NEXT: sete %al
3341 ; X64-AVX2-NEXT: vzeroupper
3342 ; X64-AVX2-NEXT: retq
3344 ; X64-AVX512BW-LABEL: length64_eq_const:
3345 ; X64-AVX512BW: # %bb.0:
3346 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3347 ; X64-AVX512BW-NEXT: vpcmpneqb {{.*}}(%rip), %zmm0, %k0
3348 ; X64-AVX512BW-NEXT: kortestq %k0, %k0
3349 ; X64-AVX512BW-NEXT: sete %al
3350 ; X64-AVX512BW-NEXT: vzeroupper
3351 ; X64-AVX512BW-NEXT: retq
3353 ; X64-AVX512F-LABEL: length64_eq_const:
3354 ; X64-AVX512F: # %bb.0:
3355 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3356 ; X64-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k0
3357 ; X64-AVX512F-NEXT: kortestw %k0, %k0
3358 ; X64-AVX512F-NEXT: sete %al
3359 ; X64-AVX512F-NEXT: vzeroupper
3360 ; X64-AVX512F-NEXT: retq
3362 ; X64-MIC-AVX2-LABEL: length64_eq_const:
3363 ; X64-MIC-AVX2: # %bb.0:
3364 ; X64-MIC-AVX2-NEXT: vmovdqu (%rdi), %ymm0
3365 ; X64-MIC-AVX2-NEXT: vmovdqu 32(%rdi), %ymm1
3366 ; X64-MIC-AVX2-NEXT: vmovdqa {{.*#+}} ymm2 = [892613426,959985462,858927408,926299444,825243960,…
3367 ; X64-MIC-AVX2-NEXT: vpcmpneqd %zmm2, %zmm1, %k0
3368 ; X64-MIC-AVX2-NEXT: vmovdqa {{.*#+}} ymm1 = [858927408,926299444,825243960,892613426,959985462,…
3369 ; X64-MIC-AVX2-NEXT: vpcmpneqd %zmm1, %zmm0, %k1
3370 ; X64-MIC-AVX2-NEXT: kortestw %k0, %k1
3371 ; X64-MIC-AVX2-NEXT: sete %al
3372 ; X64-MIC-AVX2-NEXT: vzeroupper
3373 ; X64-MIC-AVX2-NEXT: retq
3375 ; X64-MIC-AVX512F-LABEL: length64_eq_const:
3376 ; X64-MIC-AVX512F: # %bb.0:
3377 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3378 ; X64-MIC-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k0
3379 ; X64-MIC-AVX512F-NEXT: kortestw %k0, %k0
3380 ; X64-MIC-AVX512F-NEXT: sete %al
3381 ; X64-MIC-AVX512F-NEXT: vzeroupper
3382 ; X64-MIC-AVX512F-NEXT: retq
3383 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 64) nounwind
3384 %c = icmp eq i32 %m, 0
3390 ; X86: # %bb.0:
3391 ; X86-NEXT: pushl $0
3393 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3394 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3399 ; X64-LABEL: length96:
3400 ; X64: # %bb.0:
3401 ; X64-NEXT: movl $96, %edx
3402 ; X64-NEXT: jmp memcmp # TAILCALL
3409 ; X86: # %bb.0:
3410 ; X86-NEXT: pushl $0
3412 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3413 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3420 ; X64-SSE-LABEL: length96_eq:
3421 ; X64-SSE: # %bb.0:
3422 ; X64-SSE-NEXT: pushq %rax
3423 ; X64-SSE-NEXT: movl $96, %edx
3424 ; X64-SSE-NEXT: callq memcmp
3425 ; X64-SSE-NEXT: testl %eax, %eax
3426 ; X64-SSE-NEXT: setne %al
3427 ; X64-SSE-NEXT: popq %rcx
3428 ; X64-SSE-NEXT: retq
3430 ; X64-AVX1-LABEL: length96_eq:
3431 ; X64-AVX1: # %bb.0:
3432 ; X64-AVX1-NEXT: pushq %rax
3433 ; X64-AVX1-NEXT: movl $96, %edx
3434 ; X64-AVX1-NEXT: callq memcmp
3435 ; X64-AVX1-NEXT: testl %eax, %eax
3436 ; X64-AVX1-NEXT: setne %al
3437 ; X64-AVX1-NEXT: popq %rcx
3438 ; X64-AVX1-NEXT: retq
3440 ; X64-AVX2-LABEL: length96_eq:
3441 ; X64-AVX2: # %bb.0:
3442 ; X64-AVX2-NEXT: pushq %rax
3443 ; X64-AVX2-NEXT: movl $96, %edx
3444 ; X64-AVX2-NEXT: callq memcmp
3445 ; X64-AVX2-NEXT: testl %eax, %eax
3446 ; X64-AVX2-NEXT: setne %al
3447 ; X64-AVX2-NEXT: popq %rcx
3448 ; X64-AVX2-NEXT: retq
3450 ; X64-AVX512BW-LABEL: length96_eq:
3451 ; X64-AVX512BW: # %bb.0:
3452 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3453 ; X64-AVX512BW-NEXT: vmovdqu 64(%rdi), %ymm1
3454 ; X64-AVX512BW-NEXT: vmovdqu 64(%rsi), %ymm2
3455 ; X64-AVX512BW-NEXT: vpcmpneqb (%rsi), %zmm0, %k0
3456 ; X64-AVX512BW-NEXT: vpcmpneqb %zmm2, %zmm1, %k1
3457 ; X64-AVX512BW-NEXT: kortestq %k1, %k0
3458 ; X64-AVX512BW-NEXT: setne %al
3459 ; X64-AVX512BW-NEXT: vzeroupper
3460 ; X64-AVX512BW-NEXT: retq
3462 ; X64-AVX512F-LABEL: length96_eq:
3463 ; X64-AVX512F: # %bb.0:
3464 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3465 ; X64-AVX512F-NEXT: vmovdqu 64(%rdi), %ymm1
3466 ; X64-AVX512F-NEXT: vmovdqu 64(%rsi), %ymm2
3467 ; X64-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k0
3468 ; X64-AVX512F-NEXT: vpcmpneqd %zmm2, %zmm1, %k1
3469 ; X64-AVX512F-NEXT: kortestw %k1, %k0
3470 ; X64-AVX512F-NEXT: setne %al
3471 ; X64-AVX512F-NEXT: vzeroupper
3472 ; X64-AVX512F-NEXT: retq
3474 ; X64-MIC-AVX2-LABEL: length96_eq:
3475 ; X64-MIC-AVX2: # %bb.0:
3476 ; X64-MIC-AVX2-NEXT: pushq %rax
3477 ; X64-MIC-AVX2-NEXT: movl $96, %edx
3478 ; X64-MIC-AVX2-NEXT: callq memcmp
3479 ; X64-MIC-AVX2-NEXT: testl %eax, %eax
3480 ; X64-MIC-AVX2-NEXT: setne %al
3481 ; X64-MIC-AVX2-NEXT: popq %rcx
3482 ; X64-MIC-AVX2-NEXT: retq
3484 ; X64-MIC-AVX512F-LABEL: length96_eq:
3485 ; X64-MIC-AVX512F: # %bb.0:
3486 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3487 ; X64-MIC-AVX512F-NEXT: vmovdqu 64(%rdi), %ymm1
3488 ; X64-MIC-AVX512F-NEXT: vmovdqu 64(%rsi), %ymm2
3489 ; X64-MIC-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k0
3490 ; X64-MIC-AVX512F-NEXT: vpcmpneqd %zmm2, %zmm1, %k1
3491 ; X64-MIC-AVX512F-NEXT: kortestw %k1, %k0
3492 ; X64-MIC-AVX512F-NEXT: setne %al
3493 ; X64-MIC-AVX512F-NEXT: vzeroupper
3494 ; X64-MIC-AVX512F-NEXT: retq
3496 %cmp = icmp ne i32 %call, 0
3502 ; X86: # %bb.0:
3503 ; X86-NEXT: pushl $0
3505 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3506 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3513 ; X64-LABEL: length96_lt:
3514 ; X64: # %bb.0:
3515 ; X64-NEXT: pushq %rax
3516 ; X64-NEXT: movl $96, %edx
3517 ; X64-NEXT: callq memcmp
3518 ; X64-NEXT: shrl $31, %eax
3519 ; X64-NEXT: # kill: def $al killed $al killed $eax
3520 ; X64-NEXT: popq %rcx
3521 ; X64-NEXT: retq
3523 %cmp = icmp slt i32 %call, 0
3529 ; X86: # %bb.0:
3530 ; X86-NEXT: pushl $0
3532 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3533 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3540 ; X64-LABEL: length96_gt:
3541 ; X64: # %bb.0:
3542 ; X64-NEXT: pushq %rax
3543 ; X64-NEXT: movl $96, %edx
3544 ; X64-NEXT: callq memcmp
3545 ; X64-NEXT: testl %eax, %eax
3546 ; X64-NEXT: setg %al
3547 ; X64-NEXT: popq %rcx
3548 ; X64-NEXT: retq
3550 %cmp = icmp sgt i32 %call, 0
3556 ; X86: # %bb.0:
3557 ; X86-NEXT: pushl $0
3560 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3567 ; X64-SSE-LABEL: length96_eq_const:
3568 ; X64-SSE: # %bb.0:
3569 ; X64-SSE-NEXT: pushq %rax
3570 ; X64-SSE-NEXT: movl $.L.str, %esi
3571 ; X64-SSE-NEXT: movl $96, %edx
3572 ; X64-SSE-NEXT: callq memcmp
3573 ; X64-SSE-NEXT: testl %eax, %eax
3574 ; X64-SSE-NEXT: sete %al
3575 ; X64-SSE-NEXT: popq %rcx
3576 ; X64-SSE-NEXT: retq
3578 ; X64-AVX1-LABEL: length96_eq_const:
3579 ; X64-AVX1: # %bb.0:
3580 ; X64-AVX1-NEXT: pushq %rax
3581 ; X64-AVX1-NEXT: movl $.L.str, %esi
3582 ; X64-AVX1-NEXT: movl $96, %edx
3583 ; X64-AVX1-NEXT: callq memcmp
3584 ; X64-AVX1-NEXT: testl %eax, %eax
3585 ; X64-AVX1-NEXT: sete %al
3586 ; X64-AVX1-NEXT: popq %rcx
3587 ; X64-AVX1-NEXT: retq
3589 ; X64-AVX2-LABEL: length96_eq_const:
3590 ; X64-AVX2: # %bb.0:
3591 ; X64-AVX2-NEXT: pushq %rax
3592 ; X64-AVX2-NEXT: movl $.L.str, %esi
3593 ; X64-AVX2-NEXT: movl $96, %edx
3594 ; X64-AVX2-NEXT: callq memcmp
3595 ; X64-AVX2-NEXT: testl %eax, %eax
3596 ; X64-AVX2-NEXT: sete %al
3597 ; X64-AVX2-NEXT: popq %rcx
3598 ; X64-AVX2-NEXT: retq
3600 ; X64-AVX512BW-LABEL: length96_eq_const:
3601 ; X64-AVX512BW: # %bb.0:
3602 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3603 ; X64-AVX512BW-NEXT: vmovdqu 64(%rdi), %ymm1
3604 ; X64-AVX512BW-NEXT: vpcmpneqb {{.*}}(%rip), %zmm0, %k0
3605 ; X64-AVX512BW-NEXT: vpcmpneqb {{.*}}(%rip), %zmm1, %k1
3606 ; X64-AVX512BW-NEXT: kortestq %k1, %k0
3607 ; X64-AVX512BW-NEXT: sete %al
3608 ; X64-AVX512BW-NEXT: vzeroupper
3609 ; X64-AVX512BW-NEXT: retq
3611 ; X64-AVX512F-LABEL: length96_eq_const:
3612 ; X64-AVX512F: # %bb.0:
3613 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3614 ; X64-AVX512F-NEXT: vmovdqu 64(%rdi), %ymm1
3615 ; X64-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k0
3616 ; X64-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm1, %k1
3617 ; X64-AVX512F-NEXT: kortestw %k1, %k0
3618 ; X64-AVX512F-NEXT: sete %al
3619 ; X64-AVX512F-NEXT: vzeroupper
3620 ; X64-AVX512F-NEXT: retq
3622 ; X64-MIC-AVX2-LABEL: length96_eq_const:
3623 ; X64-MIC-AVX2: # %bb.0:
3624 ; X64-MIC-AVX2-NEXT: pushq %rax
3625 ; X64-MIC-AVX2-NEXT: movl $.L.str, %esi
3626 ; X64-MIC-AVX2-NEXT: movl $96, %edx
3627 ; X64-MIC-AVX2-NEXT: callq memcmp
3628 ; X64-MIC-AVX2-NEXT: testl %eax, %eax
3629 ; X64-MIC-AVX2-NEXT: sete %al
3630 ; X64-MIC-AVX2-NEXT: popq %rcx
3631 ; X64-MIC-AVX2-NEXT: retq
3633 ; X64-MIC-AVX512F-LABEL: length96_eq_const:
3634 ; X64-MIC-AVX512F: # %bb.0:
3635 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3636 ; X64-MIC-AVX512F-NEXT: vmovdqu 64(%rdi), %ymm1
3637 ; X64-MIC-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k0
3638 ; X64-MIC-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm1, %k1
3639 ; X64-MIC-AVX512F-NEXT: kortestw %k1, %k0
3640 ; X64-MIC-AVX512F-NEXT: sete %al
3641 ; X64-MIC-AVX512F-NEXT: vzeroupper
3642 ; X64-MIC-AVX512F-NEXT: retq
3643 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 96) nounwind
3644 %c = icmp eq i32 %m, 0
3650 ; X86: # %bb.0:
3651 ; X86-NEXT: pushl $0
3653 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3654 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3659 ; X64-LABEL: length127:
3660 ; X64: # %bb.0:
3661 ; X64-NEXT: movl $127, %edx
3662 ; X64-NEXT: jmp memcmp # TAILCALL
3669 ; X86: # %bb.0:
3670 ; X86-NEXT: pushl $0
3672 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3673 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3680 ; X64-SSE-LABEL: length127_eq:
3681 ; X64-SSE: # %bb.0:
3682 ; X64-SSE-NEXT: pushq %rax
3683 ; X64-SSE-NEXT: movl $127, %edx
3684 ; X64-SSE-NEXT: callq memcmp
3685 ; X64-SSE-NEXT: testl %eax, %eax
3686 ; X64-SSE-NEXT: setne %al
3687 ; X64-SSE-NEXT: popq %rcx
3688 ; X64-SSE-NEXT: retq
3690 ; X64-AVX1-LABEL: length127_eq:
3691 ; X64-AVX1: # %bb.0:
3692 ; X64-AVX1-NEXT: pushq %rax
3693 ; X64-AVX1-NEXT: movl $127, %edx
3694 ; X64-AVX1-NEXT: callq memcmp
3695 ; X64-AVX1-NEXT: testl %eax, %eax
3696 ; X64-AVX1-NEXT: setne %al
3697 ; X64-AVX1-NEXT: popq %rcx
3698 ; X64-AVX1-NEXT: retq
3700 ; X64-AVX2-LABEL: length127_eq:
3701 ; X64-AVX2: # %bb.0:
3702 ; X64-AVX2-NEXT: pushq %rax
3703 ; X64-AVX2-NEXT: movl $127, %edx
3704 ; X64-AVX2-NEXT: callq memcmp
3705 ; X64-AVX2-NEXT: testl %eax, %eax
3706 ; X64-AVX2-NEXT: setne %al
3707 ; X64-AVX2-NEXT: popq %rcx
3708 ; X64-AVX2-NEXT: retq
3710 ; X64-AVX512BW-LABEL: length127_eq:
3711 ; X64-AVX512BW: # %bb.0:
3712 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3713 ; X64-AVX512BW-NEXT: vmovdqu64 63(%rdi), %zmm1
3714 ; X64-AVX512BW-NEXT: vpcmpneqb 63(%rsi), %zmm1, %k0
3715 ; X64-AVX512BW-NEXT: vpcmpneqb (%rsi), %zmm0, %k1
3716 ; X64-AVX512BW-NEXT: kortestq %k0, %k1
3717 ; X64-AVX512BW-NEXT: setne %al
3718 ; X64-AVX512BW-NEXT: vzeroupper
3719 ; X64-AVX512BW-NEXT: retq
3721 ; X64-AVX512F-LABEL: length127_eq:
3722 ; X64-AVX512F: # %bb.0:
3723 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3724 ; X64-AVX512F-NEXT: vmovdqu64 63(%rdi), %zmm1
3725 ; X64-AVX512F-NEXT: vpcmpneqd 63(%rsi), %zmm1, %k0
3726 ; X64-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k1
3727 ; X64-AVX512F-NEXT: kortestw %k0, %k1
3728 ; X64-AVX512F-NEXT: setne %al
3729 ; X64-AVX512F-NEXT: vzeroupper
3730 ; X64-AVX512F-NEXT: retq
3732 ; X64-MIC-AVX2-LABEL: length127_eq:
3733 ; X64-MIC-AVX2: # %bb.0:
3734 ; X64-MIC-AVX2-NEXT: pushq %rax
3735 ; X64-MIC-AVX2-NEXT: movl $127, %edx
3736 ; X64-MIC-AVX2-NEXT: callq memcmp
3737 ; X64-MIC-AVX2-NEXT: testl %eax, %eax
3738 ; X64-MIC-AVX2-NEXT: setne %al
3739 ; X64-MIC-AVX2-NEXT: popq %rcx
3740 ; X64-MIC-AVX2-NEXT: retq
3742 ; X64-MIC-AVX512F-LABEL: length127_eq:
3743 ; X64-MIC-AVX512F: # %bb.0:
3744 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3745 ; X64-MIC-AVX512F-NEXT: vmovdqu64 63(%rdi), %zmm1
3746 ; X64-MIC-AVX512F-NEXT: vpcmpneqd 63(%rsi), %zmm1, %k0
3747 ; X64-MIC-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k1
3748 ; X64-MIC-AVX512F-NEXT: kortestw %k0, %k1
3749 ; X64-MIC-AVX512F-NEXT: setne %al
3750 ; X64-MIC-AVX512F-NEXT: vzeroupper
3751 ; X64-MIC-AVX512F-NEXT: retq
3753 %cmp = icmp ne i32 %call, 0
3759 ; X86: # %bb.0:
3760 ; X86-NEXT: pushl $0
3762 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3763 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3770 ; X64-LABEL: length127_lt:
3771 ; X64: # %bb.0:
3772 ; X64-NEXT: pushq %rax
3773 ; X64-NEXT: movl $127, %edx
3774 ; X64-NEXT: callq memcmp
3775 ; X64-NEXT: shrl $31, %eax
3776 ; X64-NEXT: # kill: def $al killed $al killed $eax
3777 ; X64-NEXT: popq %rcx
3778 ; X64-NEXT: retq
3780 %cmp = icmp slt i32 %call, 0
3786 ; X86: # %bb.0:
3787 ; X86-NEXT: pushl $0
3789 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3790 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3797 ; X64-LABEL: length127_gt:
3798 ; X64: # %bb.0:
3799 ; X64-NEXT: pushq %rax
3800 ; X64-NEXT: movl $127, %edx
3801 ; X64-NEXT: callq memcmp
3802 ; X64-NEXT: testl %eax, %eax
3803 ; X64-NEXT: setg %al
3804 ; X64-NEXT: popq %rcx
3805 ; X64-NEXT: retq
3807 %cmp = icmp sgt i32 %call, 0
3813 ; X86: # %bb.0:
3814 ; X86-NEXT: pushl $0
3817 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3824 ; X64-SSE-LABEL: length127_eq_const:
3825 ; X64-SSE: # %bb.0:
3826 ; X64-SSE-NEXT: pushq %rax
3827 ; X64-SSE-NEXT: movl $.L.str, %esi
3828 ; X64-SSE-NEXT: movl $127, %edx
3829 ; X64-SSE-NEXT: callq memcmp
3830 ; X64-SSE-NEXT: testl %eax, %eax
3831 ; X64-SSE-NEXT: sete %al
3832 ; X64-SSE-NEXT: popq %rcx
3833 ; X64-SSE-NEXT: retq
3835 ; X64-AVX1-LABEL: length127_eq_const:
3836 ; X64-AVX1: # %bb.0:
3837 ; X64-AVX1-NEXT: pushq %rax
3838 ; X64-AVX1-NEXT: movl $.L.str, %esi
3839 ; X64-AVX1-NEXT: movl $127, %edx
3840 ; X64-AVX1-NEXT: callq memcmp
3841 ; X64-AVX1-NEXT: testl %eax, %eax
3842 ; X64-AVX1-NEXT: sete %al
3843 ; X64-AVX1-NEXT: popq %rcx
3844 ; X64-AVX1-NEXT: retq
3846 ; X64-AVX2-LABEL: length127_eq_const:
3847 ; X64-AVX2: # %bb.0:
3848 ; X64-AVX2-NEXT: pushq %rax
3849 ; X64-AVX2-NEXT: movl $.L.str, %esi
3850 ; X64-AVX2-NEXT: movl $127, %edx
3851 ; X64-AVX2-NEXT: callq memcmp
3852 ; X64-AVX2-NEXT: testl %eax, %eax
3853 ; X64-AVX2-NEXT: sete %al
3854 ; X64-AVX2-NEXT: popq %rcx
3855 ; X64-AVX2-NEXT: retq
3857 ; X64-AVX512BW-LABEL: length127_eq_const:
3858 ; X64-AVX512BW: # %bb.0:
3859 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3860 ; X64-AVX512BW-NEXT: vmovdqu64 63(%rdi), %zmm1
3861 ; X64-AVX512BW-NEXT: vpcmpneqb .L.str+{{.*}}(%rip), %zmm1, %k0
3862 ; X64-AVX512BW-NEXT: vpcmpneqb {{.*}}(%rip), %zmm0, %k1
3863 ; X64-AVX512BW-NEXT: kortestq %k0, %k1
3864 ; X64-AVX512BW-NEXT: sete %al
3865 ; X64-AVX512BW-NEXT: vzeroupper
3866 ; X64-AVX512BW-NEXT: retq
3868 ; X64-AVX512F-LABEL: length127_eq_const:
3869 ; X64-AVX512F: # %bb.0:
3870 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3871 ; X64-AVX512F-NEXT: vmovdqu64 63(%rdi), %zmm1
3872 ; X64-AVX512F-NEXT: vpcmpneqd .L.str+{{.*}}(%rip), %zmm1, %k0
3873 ; X64-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k1
3874 ; X64-AVX512F-NEXT: kortestw %k0, %k1
3875 ; X64-AVX512F-NEXT: sete %al
3876 ; X64-AVX512F-NEXT: vzeroupper
3877 ; X64-AVX512F-NEXT: retq
3879 ; X64-MIC-AVX2-LABEL: length127_eq_const:
3880 ; X64-MIC-AVX2: # %bb.0:
3881 ; X64-MIC-AVX2-NEXT: pushq %rax
3882 ; X64-MIC-AVX2-NEXT: movl $.L.str, %esi
3883 ; X64-MIC-AVX2-NEXT: movl $127, %edx
3884 ; X64-MIC-AVX2-NEXT: callq memcmp
3885 ; X64-MIC-AVX2-NEXT: testl %eax, %eax
3886 ; X64-MIC-AVX2-NEXT: sete %al
3887 ; X64-MIC-AVX2-NEXT: popq %rcx
3888 ; X64-MIC-AVX2-NEXT: retq
3890 ; X64-MIC-AVX512F-LABEL: length127_eq_const:
3891 ; X64-MIC-AVX512F: # %bb.0:
3892 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3893 ; X64-MIC-AVX512F-NEXT: vmovdqu64 63(%rdi), %zmm1
3894 ; X64-MIC-AVX512F-NEXT: vpcmpneqd .L.str+{{.*}}(%rip), %zmm1, %k0
3895 ; X64-MIC-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k1
3896 ; X64-MIC-AVX512F-NEXT: kortestw %k0, %k1
3897 ; X64-MIC-AVX512F-NEXT: sete %al
3898 ; X64-MIC-AVX512F-NEXT: vzeroupper
3899 ; X64-MIC-AVX512F-NEXT: retq
3900 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 127) nounwi…
3901 %c = icmp eq i32 %m, 0
3907 ; X86: # %bb.0:
3908 ; X86-NEXT: pushl $0
3910 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3911 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3916 ; X64-LABEL: length128:
3917 ; X64: # %bb.0:
3918 ; X64-NEXT: movl $128, %edx
3919 ; X64-NEXT: jmp memcmp # TAILCALL
3926 ; X86: # %bb.0:
3927 ; X86-NEXT: pushl $0
3929 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3930 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
3937 ; X64-SSE-LABEL: length128_eq:
3938 ; X64-SSE: # %bb.0:
3939 ; X64-SSE-NEXT: pushq %rax
3940 ; X64-SSE-NEXT: movl $128, %edx
3941 ; X64-SSE-NEXT: callq memcmp
3942 ; X64-SSE-NEXT: testl %eax, %eax
3943 ; X64-SSE-NEXT: setne %al
3944 ; X64-SSE-NEXT: popq %rcx
3945 ; X64-SSE-NEXT: retq
3947 ; X64-AVX1-LABEL: length128_eq:
3948 ; X64-AVX1: # %bb.0:
3949 ; X64-AVX1-NEXT: pushq %rax
3950 ; X64-AVX1-NEXT: movl $128, %edx
3951 ; X64-AVX1-NEXT: callq memcmp
3952 ; X64-AVX1-NEXT: testl %eax, %eax
3953 ; X64-AVX1-NEXT: setne %al
3954 ; X64-AVX1-NEXT: popq %rcx
3955 ; X64-AVX1-NEXT: retq
3957 ; X64-AVX2-LABEL: length128_eq:
3958 ; X64-AVX2: # %bb.0:
3959 ; X64-AVX2-NEXT: pushq %rax
3960 ; X64-AVX2-NEXT: movl $128, %edx
3961 ; X64-AVX2-NEXT: callq memcmp
3962 ; X64-AVX2-NEXT: testl %eax, %eax
3963 ; X64-AVX2-NEXT: setne %al
3964 ; X64-AVX2-NEXT: popq %rcx
3965 ; X64-AVX2-NEXT: retq
3967 ; X64-AVX512BW-LABEL: length128_eq:
3968 ; X64-AVX512BW: # %bb.0:
3969 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
3970 ; X64-AVX512BW-NEXT: vmovdqu64 64(%rdi), %zmm1
3971 ; X64-AVX512BW-NEXT: vpcmpneqb 64(%rsi), %zmm1, %k0
3972 ; X64-AVX512BW-NEXT: vpcmpneqb (%rsi), %zmm0, %k1
3973 ; X64-AVX512BW-NEXT: kortestq %k0, %k1
3974 ; X64-AVX512BW-NEXT: setne %al
3975 ; X64-AVX512BW-NEXT: vzeroupper
3976 ; X64-AVX512BW-NEXT: retq
3978 ; X64-AVX512F-LABEL: length128_eq:
3979 ; X64-AVX512F: # %bb.0:
3980 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
3981 ; X64-AVX512F-NEXT: vmovdqu64 64(%rdi), %zmm1
3982 ; X64-AVX512F-NEXT: vpcmpneqd 64(%rsi), %zmm1, %k0
3983 ; X64-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k1
3984 ; X64-AVX512F-NEXT: kortestw %k0, %k1
3985 ; X64-AVX512F-NEXT: setne %al
3986 ; X64-AVX512F-NEXT: vzeroupper
3987 ; X64-AVX512F-NEXT: retq
3989 ; X64-MIC-AVX2-LABEL: length128_eq:
3990 ; X64-MIC-AVX2: # %bb.0:
3991 ; X64-MIC-AVX2-NEXT: pushq %rax
3992 ; X64-MIC-AVX2-NEXT: movl $128, %edx
3993 ; X64-MIC-AVX2-NEXT: callq memcmp
3994 ; X64-MIC-AVX2-NEXT: testl %eax, %eax
3995 ; X64-MIC-AVX2-NEXT: setne %al
3996 ; X64-MIC-AVX2-NEXT: popq %rcx
3997 ; X64-MIC-AVX2-NEXT: retq
3999 ; X64-MIC-AVX512F-LABEL: length128_eq:
4000 ; X64-MIC-AVX512F: # %bb.0:
4001 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
4002 ; X64-MIC-AVX512F-NEXT: vmovdqu64 64(%rdi), %zmm1
4003 ; X64-MIC-AVX512F-NEXT: vpcmpneqd 64(%rsi), %zmm1, %k0
4004 ; X64-MIC-AVX512F-NEXT: vpcmpneqd (%rsi), %zmm0, %k1
4005 ; X64-MIC-AVX512F-NEXT: kortestw %k0, %k1
4006 ; X64-MIC-AVX512F-NEXT: setne %al
4007 ; X64-MIC-AVX512F-NEXT: vzeroupper
4008 ; X64-MIC-AVX512F-NEXT: retq
4010 %cmp = icmp ne i32 %call, 0
4016 ; X86: # %bb.0:
4017 ; X86-NEXT: pushl $0
4019 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4020 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4027 ; X64-LABEL: length128_lt:
4028 ; X64: # %bb.0:
4029 ; X64-NEXT: pushq %rax
4030 ; X64-NEXT: movl $128, %edx
4031 ; X64-NEXT: callq memcmp
4032 ; X64-NEXT: shrl $31, %eax
4033 ; X64-NEXT: # kill: def $al killed $al killed $eax
4034 ; X64-NEXT: popq %rcx
4035 ; X64-NEXT: retq
4037 %cmp = icmp slt i32 %call, 0
4043 ; X86: # %bb.0:
4044 ; X86-NEXT: pushl $0
4046 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4047 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4054 ; X64-LABEL: length128_gt:
4055 ; X64: # %bb.0:
4056 ; X64-NEXT: pushq %rax
4057 ; X64-NEXT: movl $128, %edx
4058 ; X64-NEXT: callq memcmp
4059 ; X64-NEXT: testl %eax, %eax
4060 ; X64-NEXT: setg %al
4061 ; X64-NEXT: popq %rcx
4062 ; X64-NEXT: retq
4064 %cmp = icmp sgt i32 %call, 0
4070 ; X86: # %bb.0:
4071 ; X86-NEXT: pushl $0
4074 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4081 ; X64-SSE-LABEL: length128_eq_const:
4082 ; X64-SSE: # %bb.0:
4083 ; X64-SSE-NEXT: pushq %rax
4084 ; X64-SSE-NEXT: movl $.L.str, %esi
4085 ; X64-SSE-NEXT: movl $128, %edx
4086 ; X64-SSE-NEXT: callq memcmp
4087 ; X64-SSE-NEXT: testl %eax, %eax
4088 ; X64-SSE-NEXT: sete %al
4089 ; X64-SSE-NEXT: popq %rcx
4090 ; X64-SSE-NEXT: retq
4092 ; X64-AVX1-LABEL: length128_eq_const:
4093 ; X64-AVX1: # %bb.0:
4094 ; X64-AVX1-NEXT: pushq %rax
4095 ; X64-AVX1-NEXT: movl $.L.str, %esi
4096 ; X64-AVX1-NEXT: movl $128, %edx
4097 ; X64-AVX1-NEXT: callq memcmp
4098 ; X64-AVX1-NEXT: testl %eax, %eax
4099 ; X64-AVX1-NEXT: sete %al
4100 ; X64-AVX1-NEXT: popq %rcx
4101 ; X64-AVX1-NEXT: retq
4103 ; X64-AVX2-LABEL: length128_eq_const:
4104 ; X64-AVX2: # %bb.0:
4105 ; X64-AVX2-NEXT: pushq %rax
4106 ; X64-AVX2-NEXT: movl $.L.str, %esi
4107 ; X64-AVX2-NEXT: movl $128, %edx
4108 ; X64-AVX2-NEXT: callq memcmp
4109 ; X64-AVX2-NEXT: testl %eax, %eax
4110 ; X64-AVX2-NEXT: sete %al
4111 ; X64-AVX2-NEXT: popq %rcx
4112 ; X64-AVX2-NEXT: retq
4114 ; X64-AVX512BW-LABEL: length128_eq_const:
4115 ; X64-AVX512BW: # %bb.0:
4116 ; X64-AVX512BW-NEXT: vmovdqu64 (%rdi), %zmm0
4117 ; X64-AVX512BW-NEXT: vmovdqu64 64(%rdi), %zmm1
4118 ; X64-AVX512BW-NEXT: vpcmpneqb .L.str+{{.*}}(%rip), %zmm1, %k0
4119 ; X64-AVX512BW-NEXT: vpcmpneqb {{.*}}(%rip), %zmm0, %k1
4120 ; X64-AVX512BW-NEXT: kortestq %k0, %k1
4121 ; X64-AVX512BW-NEXT: sete %al
4122 ; X64-AVX512BW-NEXT: vzeroupper
4123 ; X64-AVX512BW-NEXT: retq
4125 ; X64-AVX512F-LABEL: length128_eq_const:
4126 ; X64-AVX512F: # %bb.0:
4127 ; X64-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
4128 ; X64-AVX512F-NEXT: vmovdqu64 64(%rdi), %zmm1
4129 ; X64-AVX512F-NEXT: vpcmpneqd .L.str+{{.*}}(%rip), %zmm1, %k0
4130 ; X64-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k1
4131 ; X64-AVX512F-NEXT: kortestw %k0, %k1
4132 ; X64-AVX512F-NEXT: sete %al
4133 ; X64-AVX512F-NEXT: vzeroupper
4134 ; X64-AVX512F-NEXT: retq
4136 ; X64-MIC-AVX2-LABEL: length128_eq_const:
4137 ; X64-MIC-AVX2: # %bb.0:
4138 ; X64-MIC-AVX2-NEXT: pushq %rax
4139 ; X64-MIC-AVX2-NEXT: movl $.L.str, %esi
4140 ; X64-MIC-AVX2-NEXT: movl $128, %edx
4141 ; X64-MIC-AVX2-NEXT: callq memcmp
4142 ; X64-MIC-AVX2-NEXT: testl %eax, %eax
4143 ; X64-MIC-AVX2-NEXT: sete %al
4144 ; X64-MIC-AVX2-NEXT: popq %rcx
4145 ; X64-MIC-AVX2-NEXT: retq
4147 ; X64-MIC-AVX512F-LABEL: length128_eq_const:
4148 ; X64-MIC-AVX512F: # %bb.0:
4149 ; X64-MIC-AVX512F-NEXT: vmovdqu64 (%rdi), %zmm0
4150 ; X64-MIC-AVX512F-NEXT: vmovdqu64 64(%rdi), %zmm1
4151 ; X64-MIC-AVX512F-NEXT: vpcmpneqd .L.str+{{.*}}(%rip), %zmm1, %k0
4152 ; X64-MIC-AVX512F-NEXT: vpcmpneqd {{.*}}(%rip), %zmm0, %k1
4153 ; X64-MIC-AVX512F-NEXT: kortestw %k0, %k1
4154 ; X64-MIC-AVX512F-NEXT: sete %al
4155 ; X64-MIC-AVX512F-NEXT: vzeroupper
4156 ; X64-MIC-AVX512F-NEXT: retq
4157 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 128) nounwi…
4158 %c = icmp eq i32 %m, 0
4164 ; X86: # %bb.0:
4165 ; X86-NEXT: pushl $0
4167 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4168 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4173 ; X64-LABEL: length192:
4174 ; X64: # %bb.0:
4175 ; X64-NEXT: movl $192, %edx
4176 ; X64-NEXT: jmp memcmp # TAILCALL
4183 ; X86: # %bb.0:
4184 ; X86-NEXT: pushl $0
4186 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4187 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4194 ; X64-LABEL: length192_eq:
4195 ; X64: # %bb.0:
4196 ; X64-NEXT: pushq %rax
4197 ; X64-NEXT: movl $192, %edx
4198 ; X64-NEXT: callq memcmp
4199 ; X64-NEXT: testl %eax, %eax
4200 ; X64-NEXT: setne %al
4201 ; X64-NEXT: popq %rcx
4202 ; X64-NEXT: retq
4204 %cmp = icmp ne i32 %call, 0
4210 ; X86: # %bb.0:
4211 ; X86-NEXT: pushl $0
4213 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4214 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4221 ; X64-LABEL: length192_lt:
4222 ; X64: # %bb.0:
4223 ; X64-NEXT: pushq %rax
4224 ; X64-NEXT: movl $192, %edx
4225 ; X64-NEXT: callq memcmp
4226 ; X64-NEXT: shrl $31, %eax
4227 ; X64-NEXT: # kill: def $al killed $al killed $eax
4228 ; X64-NEXT: popq %rcx
4229 ; X64-NEXT: retq
4231 %cmp = icmp slt i32 %call, 0
4237 ; X86: # %bb.0:
4238 ; X86-NEXT: pushl $0
4240 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4241 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4248 ; X64-LABEL: length192_gt:
4249 ; X64: # %bb.0:
4250 ; X64-NEXT: pushq %rax
4251 ; X64-NEXT: movl $192, %edx
4252 ; X64-NEXT: callq memcmp
4253 ; X64-NEXT: testl %eax, %eax
4254 ; X64-NEXT: setg %al
4255 ; X64-NEXT: popq %rcx
4256 ; X64-NEXT: retq
4258 %cmp = icmp sgt i32 %call, 0
4264 ; X86: # %bb.0:
4265 ; X86-NEXT: pushl $0
4268 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4275 ; X64-LABEL: length192_eq_const:
4276 ; X64: # %bb.0:
4277 ; X64-NEXT: pushq %rax
4278 ; X64-NEXT: movl $.L.str, %esi
4279 ; X64-NEXT: movl $192, %edx
4280 ; X64-NEXT: callq memcmp
4281 ; X64-NEXT: testl %eax, %eax
4282 ; X64-NEXT: sete %al
4283 ; X64-NEXT: popq %rcx
4284 ; X64-NEXT: retq
4285 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 192) nounwi…
4286 %c = icmp eq i32 %m, 0
4292 ; X86: # %bb.0:
4293 ; X86-NEXT: pushl $0
4295 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4296 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4301 ; X64-LABEL: length255:
4302 ; X64: # %bb.0:
4303 ; X64-NEXT: movl $255, %edx
4304 ; X64-NEXT: jmp memcmp # TAILCALL
4311 ; X86: # %bb.0:
4312 ; X86-NEXT: pushl $0
4314 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4315 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4322 ; X64-LABEL: length255_eq:
4323 ; X64: # %bb.0:
4324 ; X64-NEXT: pushq %rax
4325 ; X64-NEXT: movl $255, %edx
4326 ; X64-NEXT: callq memcmp
4327 ; X64-NEXT: testl %eax, %eax
4328 ; X64-NEXT: setne %al
4329 ; X64-NEXT: popq %rcx
4330 ; X64-NEXT: retq
4332 %cmp = icmp ne i32 %call, 0
4338 ; X86: # %bb.0:
4339 ; X86-NEXT: pushl $0
4341 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4342 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4349 ; X64-LABEL: length255_lt:
4350 ; X64: # %bb.0:
4351 ; X64-NEXT: pushq %rax
4352 ; X64-NEXT: movl $255, %edx
4353 ; X64-NEXT: callq memcmp
4354 ; X64-NEXT: shrl $31, %eax
4355 ; X64-NEXT: # kill: def $al killed $al killed $eax
4356 ; X64-NEXT: popq %rcx
4357 ; X64-NEXT: retq
4359 %cmp = icmp slt i32 %call, 0
4365 ; X86: # %bb.0:
4366 ; X86-NEXT: pushl $0
4368 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4369 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4376 ; X64-LABEL: length255_gt:
4377 ; X64: # %bb.0:
4378 ; X64-NEXT: pushq %rax
4379 ; X64-NEXT: movl $255, %edx
4380 ; X64-NEXT: callq memcmp
4381 ; X64-NEXT: testl %eax, %eax
4382 ; X64-NEXT: setg %al
4383 ; X64-NEXT: popq %rcx
4384 ; X64-NEXT: retq
4386 %cmp = icmp sgt i32 %call, 0
4392 ; X86: # %bb.0:
4393 ; X86-NEXT: pushl $0
4396 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4403 ; X64-LABEL: length255_eq_const:
4404 ; X64: # %bb.0:
4405 ; X64-NEXT: pushq %rax
4406 ; X64-NEXT: movl $.L.str, %esi
4407 ; X64-NEXT: movl $255, %edx
4408 ; X64-NEXT: callq memcmp
4409 ; X64-NEXT: testl %eax, %eax
4410 ; X64-NEXT: sete %al
4411 ; X64-NEXT: popq %rcx
4412 ; X64-NEXT: retq
4413 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 255) nounwi…
4414 %c = icmp eq i32 %m, 0
4420 ; X86: # %bb.0:
4421 ; X86-NEXT: pushl $0
4422 ; X86-NEXT: pushl $256 # imm = 0x100
4423 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4424 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4429 ; X64-LABEL: length256:
4430 ; X64: # %bb.0:
4431 ; X64-NEXT: movl $256, %edx # imm = 0x100
4432 ; X64-NEXT: jmp memcmp # TAILCALL
4439 ; X86: # %bb.0:
4440 ; X86-NEXT: pushl $0
4441 ; X86-NEXT: pushl $256 # imm = 0x100
4442 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4443 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4450 ; X64-LABEL: length256_eq:
4451 ; X64: # %bb.0:
4452 ; X64-NEXT: pushq %rax
4453 ; X64-NEXT: movl $256, %edx # imm = 0x100
4454 ; X64-NEXT: callq memcmp
4455 ; X64-NEXT: testl %eax, %eax
4456 ; X64-NEXT: setne %al
4457 ; X64-NEXT: popq %rcx
4458 ; X64-NEXT: retq
4460 %cmp = icmp ne i32 %call, 0
4466 ; X86: # %bb.0:
4467 ; X86-NEXT: pushl $0
4468 ; X86-NEXT: pushl $256 # imm = 0x100
4469 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4470 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4477 ; X64-LABEL: length256_lt:
4478 ; X64: # %bb.0:
4479 ; X64-NEXT: pushq %rax
4480 ; X64-NEXT: movl $256, %edx # imm = 0x100
4481 ; X64-NEXT: callq memcmp
4482 ; X64-NEXT: shrl $31, %eax
4483 ; X64-NEXT: # kill: def $al killed $al killed $eax
4484 ; X64-NEXT: popq %rcx
4485 ; X64-NEXT: retq
4487 %cmp = icmp slt i32 %call, 0
4493 ; X86: # %bb.0:
4494 ; X86-NEXT: pushl $0
4495 ; X86-NEXT: pushl $256 # imm = 0x100
4496 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4497 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4504 ; X64-LABEL: length256_gt:
4505 ; X64: # %bb.0:
4506 ; X64-NEXT: pushq %rax
4507 ; X64-NEXT: movl $256, %edx # imm = 0x100
4508 ; X64-NEXT: callq memcmp
4509 ; X64-NEXT: testl %eax, %eax
4510 ; X64-NEXT: setg %al
4511 ; X64-NEXT: popq %rcx
4512 ; X64-NEXT: retq
4514 %cmp = icmp sgt i32 %call, 0
4520 ; X86: # %bb.0:
4521 ; X86-NEXT: pushl $0
4522 ; X86-NEXT: pushl $256 # imm = 0x100
4524 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4531 ; X64-LABEL: length256_eq_const:
4532 ; X64: # %bb.0:
4533 ; X64-NEXT: pushq %rax
4534 ; X64-NEXT: movl $.L.str, %esi
4535 ; X64-NEXT: movl $256, %edx # imm = 0x100
4536 ; X64-NEXT: callq memcmp
4537 ; X64-NEXT: testl %eax, %eax
4538 ; X64-NEXT: sete %al
4539 ; X64-NEXT: popq %rcx
4540 ; X64-NEXT: retq
4541 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 256) nounwi…
4542 %c = icmp eq i32 %m, 0
4548 ; X86: # %bb.0:
4549 ; X86-NEXT: pushl $0
4550 ; X86-NEXT: pushl $384 # imm = 0x180
4551 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4552 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4557 ; X64-LABEL: length384:
4558 ; X64: # %bb.0:
4559 ; X64-NEXT: movl $384, %edx # imm = 0x180
4560 ; X64-NEXT: jmp memcmp # TAILCALL
4567 ; X86: # %bb.0:
4568 ; X86-NEXT: pushl $0
4569 ; X86-NEXT: pushl $384 # imm = 0x180
4570 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4571 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4578 ; X64-LABEL: length384_eq:
4579 ; X64: # %bb.0:
4580 ; X64-NEXT: pushq %rax
4581 ; X64-NEXT: movl $384, %edx # imm = 0x180
4582 ; X64-NEXT: callq memcmp
4583 ; X64-NEXT: testl %eax, %eax
4584 ; X64-NEXT: setne %al
4585 ; X64-NEXT: popq %rcx
4586 ; X64-NEXT: retq
4588 %cmp = icmp ne i32 %call, 0
4594 ; X86: # %bb.0:
4595 ; X86-NEXT: pushl $0
4596 ; X86-NEXT: pushl $384 # imm = 0x180
4597 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4598 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4605 ; X64-LABEL: length384_lt:
4606 ; X64: # %bb.0:
4607 ; X64-NEXT: pushq %rax
4608 ; X64-NEXT: movl $384, %edx # imm = 0x180
4609 ; X64-NEXT: callq memcmp
4610 ; X64-NEXT: shrl $31, %eax
4611 ; X64-NEXT: # kill: def $al killed $al killed $eax
4612 ; X64-NEXT: popq %rcx
4613 ; X64-NEXT: retq
4615 %cmp = icmp slt i32 %call, 0
4621 ; X86: # %bb.0:
4622 ; X86-NEXT: pushl $0
4623 ; X86-NEXT: pushl $384 # imm = 0x180
4624 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4625 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4632 ; X64-LABEL: length384_gt:
4633 ; X64: # %bb.0:
4634 ; X64-NEXT: pushq %rax
4635 ; X64-NEXT: movl $384, %edx # imm = 0x180
4636 ; X64-NEXT: callq memcmp
4637 ; X64-NEXT: testl %eax, %eax
4638 ; X64-NEXT: setg %al
4639 ; X64-NEXT: popq %rcx
4640 ; X64-NEXT: retq
4642 %cmp = icmp sgt i32 %call, 0
4648 ; X86: # %bb.0:
4649 ; X86-NEXT: pushl $0
4650 ; X86-NEXT: pushl $384 # imm = 0x180
4652 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4659 ; X64-LABEL: length384_eq_const:
4660 ; X64: # %bb.0:
4661 ; X64-NEXT: pushq %rax
4662 ; X64-NEXT: movl $.L.str, %esi
4663 ; X64-NEXT: movl $384, %edx # imm = 0x180
4664 ; X64-NEXT: callq memcmp
4665 ; X64-NEXT: testl %eax, %eax
4666 ; X64-NEXT: sete %al
4667 ; X64-NEXT: popq %rcx
4668 ; X64-NEXT: retq
4669 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 384) nounwi…
4670 %c = icmp eq i32 %m, 0
4676 ; X86: # %bb.0:
4677 ; X86-NEXT: pushl $0
4678 ; X86-NEXT: pushl $511 # imm = 0x1FF
4679 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4680 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4685 ; X64-LABEL: length511:
4686 ; X64: # %bb.0:
4687 ; X64-NEXT: movl $511, %edx # imm = 0x1FF
4688 ; X64-NEXT: jmp memcmp # TAILCALL
4695 ; X86: # %bb.0:
4696 ; X86-NEXT: pushl $0
4697 ; X86-NEXT: pushl $511 # imm = 0x1FF
4698 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4699 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4706 ; X64-LABEL: length511_eq:
4707 ; X64: # %bb.0:
4708 ; X64-NEXT: pushq %rax
4709 ; X64-NEXT: movl $511, %edx # imm = 0x1FF
4710 ; X64-NEXT: callq memcmp
4711 ; X64-NEXT: testl %eax, %eax
4712 ; X64-NEXT: setne %al
4713 ; X64-NEXT: popq %rcx
4714 ; X64-NEXT: retq
4716 %cmp = icmp ne i32 %call, 0
4722 ; X86: # %bb.0:
4723 ; X86-NEXT: pushl $0
4724 ; X86-NEXT: pushl $511 # imm = 0x1FF
4725 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4726 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4733 ; X64-LABEL: length511_lt:
4734 ; X64: # %bb.0:
4735 ; X64-NEXT: pushq %rax
4736 ; X64-NEXT: movl $511, %edx # imm = 0x1FF
4737 ; X64-NEXT: callq memcmp
4738 ; X64-NEXT: shrl $31, %eax
4739 ; X64-NEXT: # kill: def $al killed $al killed $eax
4740 ; X64-NEXT: popq %rcx
4741 ; X64-NEXT: retq
4743 %cmp = icmp slt i32 %call, 0
4749 ; X86: # %bb.0:
4750 ; X86-NEXT: pushl $0
4751 ; X86-NEXT: pushl $511 # imm = 0x1FF
4752 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4753 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4760 ; X64-LABEL: length511_gt:
4761 ; X64: # %bb.0:
4762 ; X64-NEXT: pushq %rax
4763 ; X64-NEXT: movl $511, %edx # imm = 0x1FF
4764 ; X64-NEXT: callq memcmp
4765 ; X64-NEXT: testl %eax, %eax
4766 ; X64-NEXT: setg %al
4767 ; X64-NEXT: popq %rcx
4768 ; X64-NEXT: retq
4770 %cmp = icmp sgt i32 %call, 0
4776 ; X86: # %bb.0:
4777 ; X86-NEXT: pushl $0
4778 ; X86-NEXT: pushl $511 # imm = 0x1FF
4780 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4787 ; X64-LABEL: length511_eq_const:
4788 ; X64: # %bb.0:
4789 ; X64-NEXT: pushq %rax
4790 ; X64-NEXT: movl $.L.str, %esi
4791 ; X64-NEXT: movl $511, %edx # imm = 0x1FF
4792 ; X64-NEXT: callq memcmp
4793 ; X64-NEXT: testl %eax, %eax
4794 ; X64-NEXT: sete %al
4795 ; X64-NEXT: popq %rcx
4796 ; X64-NEXT: retq
4797 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 511) nounwi…
4798 %c = icmp eq i32 %m, 0
4804 ; X86: # %bb.0:
4805 ; X86-NEXT: pushl $0
4806 ; X86-NEXT: pushl $512 # imm = 0x200
4807 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4808 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4813 ; X64-LABEL: length512:
4814 ; X64: # %bb.0:
4815 ; X64-NEXT: movl $512, %edx # imm = 0x200
4816 ; X64-NEXT: jmp memcmp # TAILCALL
4823 ; X86: # %bb.0:
4824 ; X86-NEXT: pushl $0
4825 ; X86-NEXT: pushl $512 # imm = 0x200
4826 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4827 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4834 ; X64-LABEL: length512_eq:
4835 ; X64: # %bb.0:
4836 ; X64-NEXT: pushq %rax
4837 ; X64-NEXT: movl $512, %edx # imm = 0x200
4838 ; X64-NEXT: callq memcmp
4839 ; X64-NEXT: testl %eax, %eax
4840 ; X64-NEXT: setne %al
4841 ; X64-NEXT: popq %rcx
4842 ; X64-NEXT: retq
4844 %cmp = icmp ne i32 %call, 0
4850 ; X86: # %bb.0:
4851 ; X86-NEXT: pushl $0
4852 ; X86-NEXT: pushl $512 # imm = 0x200
4853 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4854 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4861 ; X64-LABEL: length512_lt:
4862 ; X64: # %bb.0:
4863 ; X64-NEXT: pushq %rax
4864 ; X64-NEXT: movl $512, %edx # imm = 0x200
4865 ; X64-NEXT: callq memcmp
4866 ; X64-NEXT: shrl $31, %eax
4867 ; X64-NEXT: # kill: def $al killed $al killed $eax
4868 ; X64-NEXT: popq %rcx
4869 ; X64-NEXT: retq
4871 %cmp = icmp slt i32 %call, 0
4877 ; X86: # %bb.0:
4878 ; X86-NEXT: pushl $0
4879 ; X86-NEXT: pushl $512 # imm = 0x200
4880 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4881 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4888 ; X64-LABEL: length512_gt:
4889 ; X64: # %bb.0:
4890 ; X64-NEXT: pushq %rax
4891 ; X64-NEXT: movl $512, %edx # imm = 0x200
4892 ; X64-NEXT: callq memcmp
4893 ; X64-NEXT: testl %eax, %eax
4894 ; X64-NEXT: setg %al
4895 ; X64-NEXT: popq %rcx
4896 ; X64-NEXT: retq
4898 %cmp = icmp sgt i32 %call, 0
4904 ; X86: # %bb.0:
4905 ; X86-NEXT: pushl $0
4906 ; X86-NEXT: pushl $512 # imm = 0x200
4908 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4915 ; X64-LABEL: length512_eq_const:
4916 ; X64: # %bb.0:
4917 ; X64-NEXT: pushq %rax
4918 ; X64-NEXT: movl $.L.str, %esi
4919 ; X64-NEXT: movl $512, %edx # imm = 0x200
4920 ; X64-NEXT: callq memcmp
4921 ; X64-NEXT: testl %eax, %eax
4922 ; X64-NEXT: sete %al
4923 ; X64-NEXT: popq %rcx
4924 ; X64-NEXT: retq
4925 …(i8* %X, i8* getelementptr inbounds ([513 x i8], [513 x i8]* @.str, i32 0, i32 0), i64 512) nounwi…
4926 %c = icmp eq i32 %m, 0
4933 ; X86: # %bb.0:
4934 ; X86-NEXT: pushl $2147483647 # imm = 0x7FFFFFFF
4936 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4937 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4942 ; X64-LABEL: huge_length:
4943 ; X64: # %bb.0:
4944 ; X64-NEXT: movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF
4945 ; X64-NEXT: jmp memcmp # TAILCALL
4952 ; X86: # %bb.0:
4953 ; X86-NEXT: pushl $2147483647 # imm = 0x7FFFFFFF
4955 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4956 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4963 ; X64-LABEL: huge_length_eq:
4964 ; X64: # %bb.0:
4965 ; X64-NEXT: pushq %rax
4966 ; X64-NEXT: movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF
4967 ; X64-NEXT: callq memcmp
4968 ; X64-NEXT: testl %eax, %eax
4969 ; X64-NEXT: sete %al
4970 ; X64-NEXT: popq %rcx
4971 ; X64-NEXT: retq
4973 %c = icmp eq i32 %m, 0
4980 ; X86: # %bb.0:
4983 ; X64-LABEL: nonconst_length:
4984 ; X64: # %bb.0:
4985 ; X64-NEXT: jmp memcmp # TAILCALL
4992 ; X86: # %bb.0:
4993 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4994 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4995 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
4996 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
5003 ; X64-LABEL: nonconst_length_eq:
5004 ; X64: # %bb.0:
5005 ; X64-NEXT: pushq %rax
5006 ; X64-NEXT: callq memcmp
5007 ; X64-NEXT: testl %eax, %eax
5008 ; X64-NEXT: sete %al
5009 ; X64-NEXT: popq %rcx
5010 ; X64-NEXT: retq
5012 %c = icmp eq i32 %m, 0