Lines Matching refs:BMI2
5 …ple=i686-unknown-linux-gnu -mattr=+bmi,+tbm,+bmi2 < %s | FileCheck %s --check-prefixes=X86,X86-BMI2
6 …ple=i686-unknown-linux-gnu -mattr=+bmi,-tbm,+bmi2 < %s | FileCheck %s --check-prefixes=X86,X86-BMI2
10 …e=x86_64-unknown-linux-gnu -mattr=+bmi,+tbm,+bmi2 < %s | FileCheck %s --check-prefixes=X64,X64-BMI2
11 …e=x86_64-unknown-linux-gnu -mattr=+bmi,-tbm,+bmi2 < %s | FileCheck %s --check-prefixes=X64,X64-BMI2
18 ; are equivalent, but we prefer the second variant if we have BMI2.
108 ; X86-BMI2-LABEL: clear_lowbits16_c0:
109 ; X86-BMI2: # %bb.0:
110 ; X86-BMI2-NEXT: movzwl {{[0-9]+}}(%esp), %eax
111 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
112 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
113 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
114 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
115 ; X86-BMI2-NEXT: retl
127 ; X64-BMI2-LABEL: clear_lowbits16_c0:
128 ; X64-BMI2: # %bb.0:
129 ; X64-BMI2-NEXT: movzwl %di, %eax
130 ; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
131 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
132 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
133 ; X64-BMI2-NEXT: retq
149 ; X86-BMI2-LABEL: clear_lowbits16_c1_indexzext:
150 ; X86-BMI2: # %bb.0:
151 ; X86-BMI2-NEXT: movzwl {{[0-9]+}}(%esp), %eax
152 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
153 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
154 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
155 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
156 ; X86-BMI2-NEXT: retl
168 ; X64-BMI2-LABEL: clear_lowbits16_c1_indexzext:
169 ; X64-BMI2: # %bb.0:
170 ; X64-BMI2-NEXT: movzwl %di, %eax
171 ; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
172 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
173 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
174 ; X64-BMI2-NEXT: retq
192 ; X86-BMI2-LABEL: clear_lowbits16_c2_load:
193 ; X86-BMI2: # %bb.0:
194 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %al
195 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
196 ; X86-BMI2-NEXT: movzwl (%ecx), %ecx
197 ; X86-BMI2-NEXT: shrxl %eax, %ecx, %ecx
198 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
199 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
200 ; X86-BMI2-NEXT: retl
212 ; X64-BMI2-LABEL: clear_lowbits16_c2_load:
213 ; X64-BMI2: # %bb.0:
214 ; X64-BMI2-NEXT: movzwl (%rdi), %eax
215 ; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
216 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
217 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
218 ; X64-BMI2-NEXT: retq
236 ; X86-BMI2-LABEL: clear_lowbits16_c3_load_indexzext:
237 ; X86-BMI2: # %bb.0:
238 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %al
239 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
240 ; X86-BMI2-NEXT: movzwl (%ecx), %ecx
241 ; X86-BMI2-NEXT: shrxl %eax, %ecx, %ecx
242 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
243 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
244 ; X86-BMI2-NEXT: retl
256 ; X64-BMI2-LABEL: clear_lowbits16_c3_load_indexzext:
257 ; X64-BMI2: # %bb.0:
258 ; X64-BMI2-NEXT: movzwl (%rdi), %eax
259 ; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
260 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
261 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
262 ; X64-BMI2-NEXT: retq
280 ; X86-BMI2-LABEL: clear_lowbits16_c4_commutative:
281 ; X86-BMI2: # %bb.0:
282 ; X86-BMI2-NEXT: movzwl {{[0-9]+}}(%esp), %eax
283 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
284 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
285 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
286 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
287 ; X86-BMI2-NEXT: retl
299 ; X64-BMI2-LABEL: clear_lowbits16_c4_commutative:
300 ; X64-BMI2: # %bb.0:
301 ; X64-BMI2-NEXT: movzwl %di, %eax
302 ; X64-BMI2-NEXT: shrxl %esi, %eax, %eax
303 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
304 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
305 ; X64-BMI2-NEXT: retq
322 ; X86-BMI2-LABEL: clear_lowbits32_c0:
323 ; X86-BMI2: # %bb.0:
324 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %al
325 ; X86-BMI2-NEXT: shrxl %eax, {{[0-9]+}}(%esp), %ecx
326 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
327 ; X86-BMI2-NEXT: retl
338 ; X64-BMI2-LABEL: clear_lowbits32_c0:
339 ; X64-BMI2: # %bb.0:
340 ; X64-BMI2-NEXT: shrxl %esi, %edi, %eax
341 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
342 ; X64-BMI2-NEXT: retq
357 ; X86-BMI2-LABEL: clear_lowbits32_c1_indexzext:
358 ; X86-BMI2: # %bb.0:
359 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %al
360 ; X86-BMI2-NEXT: shrxl %eax, {{[0-9]+}}(%esp), %ecx
361 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
362 ; X86-BMI2-NEXT: retl
373 ; X64-BMI2-LABEL: clear_lowbits32_c1_indexzext:
374 ; X64-BMI2: # %bb.0:
375 ; X64-BMI2-NEXT: shrxl %esi, %edi, %eax
376 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
377 ; X64-BMI2-NEXT: retq
394 ; X86-BMI2-LABEL: clear_lowbits32_c2_load:
395 ; X86-BMI2: # %bb.0:
396 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
397 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
398 ; X86-BMI2-NEXT: shrxl %ecx, (%eax), %eax
399 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
400 ; X86-BMI2-NEXT: retl
411 ; X64-BMI2-LABEL: clear_lowbits32_c2_load:
412 ; X64-BMI2: # %bb.0:
413 ; X64-BMI2-NEXT: shrxl %esi, (%rdi), %eax
414 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
415 ; X64-BMI2-NEXT: retq
432 ; X86-BMI2-LABEL: clear_lowbits32_c3_load_indexzext:
433 ; X86-BMI2: # %bb.0:
434 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
435 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
436 ; X86-BMI2-NEXT: shrxl %ecx, (%eax), %eax
437 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
438 ; X86-BMI2-NEXT: retl
449 ; X64-BMI2-LABEL: clear_lowbits32_c3_load_indexzext:
450 ; X64-BMI2: # %bb.0:
451 ; X64-BMI2-NEXT: shrxl %esi, (%rdi), %eax
452 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
453 ; X64-BMI2-NEXT: retq
470 ; X86-BMI2-LABEL: clear_lowbits32_c4_commutative:
471 ; X86-BMI2: # %bb.0:
472 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %al
473 ; X86-BMI2-NEXT: shrxl %eax, {{[0-9]+}}(%esp), %ecx
474 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
475 ; X86-BMI2-NEXT: retl
486 ; X64-BMI2-LABEL: clear_lowbits32_c4_commutative:
487 ; X64-BMI2: # %bb.0:
488 ; X64-BMI2-NEXT: shrxl %esi, %edi, %eax
489 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
490 ; X64-BMI2-NEXT: retq
515 ; X86-BMI2-LABEL: clear_lowbits64_c0:
516 ; X86-BMI2: # %bb.0:
517 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
518 ; X86-BMI2-NEXT: movl $-1, %edx
519 ; X86-BMI2-NEXT: shlxl %ecx, %edx, %eax
520 ; X86-BMI2-NEXT: testb $32, %cl
521 ; X86-BMI2-NEXT: je .LBB13_2
522 ; X86-BMI2-NEXT: # %bb.1:
523 ; X86-BMI2-NEXT: movl %eax, %edx
524 ; X86-BMI2-NEXT: xorl %eax, %eax
525 ; X86-BMI2-NEXT: .LBB13_2:
526 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %eax
527 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edx
528 ; X86-BMI2-NEXT: retl
539 ; X64-BMI2-LABEL: clear_lowbits64_c0:
540 ; X64-BMI2: # %bb.0:
541 ; X64-BMI2-NEXT: shrxq %rsi, %rdi, %rax
542 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
543 ; X64-BMI2-NEXT: retq
566 ; X86-BMI2-LABEL: clear_lowbits64_c1_indexzext:
567 ; X86-BMI2: # %bb.0:
568 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
569 ; X86-BMI2-NEXT: movl $-1, %edx
570 ; X86-BMI2-NEXT: shlxl %ecx, %edx, %eax
571 ; X86-BMI2-NEXT: testb $32, %cl
572 ; X86-BMI2-NEXT: je .LBB14_2
573 ; X86-BMI2-NEXT: # %bb.1:
574 ; X86-BMI2-NEXT: movl %eax, %edx
575 ; X86-BMI2-NEXT: xorl %eax, %eax
576 ; X86-BMI2-NEXT: .LBB14_2:
577 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %eax
578 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edx
579 ; X86-BMI2-NEXT: retl
590 ; X64-BMI2-LABEL: clear_lowbits64_c1_indexzext:
591 ; X64-BMI2: # %bb.0:
592 ; X64-BMI2-NEXT: # kill: def $esi killed $esi def $rsi
593 ; X64-BMI2-NEXT: shrxq %rsi, %rdi, %rax
594 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
595 ; X64-BMI2-NEXT: retq
622 ; X86-BMI2-LABEL: clear_lowbits64_c2_load:
623 ; X86-BMI2: # %bb.0:
624 ; X86-BMI2-NEXT: pushl %ebx
625 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
626 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %bl
627 ; X86-BMI2-NEXT: movl $-1, %edx
628 ; X86-BMI2-NEXT: shlxl %ebx, %edx, %eax
629 ; X86-BMI2-NEXT: testb $32, %bl
630 ; X86-BMI2-NEXT: je .LBB15_2
631 ; X86-BMI2-NEXT: # %bb.1:
632 ; X86-BMI2-NEXT: movl %eax, %edx
633 ; X86-BMI2-NEXT: xorl %eax, %eax
634 ; X86-BMI2-NEXT: .LBB15_2:
635 ; X86-BMI2-NEXT: andl (%ecx), %eax
636 ; X86-BMI2-NEXT: andl 4(%ecx), %edx
637 ; X86-BMI2-NEXT: popl %ebx
638 ; X86-BMI2-NEXT: retl
649 ; X64-BMI2-LABEL: clear_lowbits64_c2_load:
650 ; X64-BMI2: # %bb.0:
651 ; X64-BMI2-NEXT: shrxq %rsi, (%rdi), %rax
652 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
653 ; X64-BMI2-NEXT: retq
680 ; X86-BMI2-LABEL: clear_lowbits64_c3_load_indexzext:
681 ; X86-BMI2: # %bb.0:
682 ; X86-BMI2-NEXT: pushl %ebx
683 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
684 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %bl
685 ; X86-BMI2-NEXT: movl $-1, %edx
686 ; X86-BMI2-NEXT: shlxl %ebx, %edx, %eax
687 ; X86-BMI2-NEXT: testb $32, %bl
688 ; X86-BMI2-NEXT: je .LBB16_2
689 ; X86-BMI2-NEXT: # %bb.1:
690 ; X86-BMI2-NEXT: movl %eax, %edx
691 ; X86-BMI2-NEXT: xorl %eax, %eax
692 ; X86-BMI2-NEXT: .LBB16_2:
693 ; X86-BMI2-NEXT: andl (%ecx), %eax
694 ; X86-BMI2-NEXT: andl 4(%ecx), %edx
695 ; X86-BMI2-NEXT: popl %ebx
696 ; X86-BMI2-NEXT: retl
707 ; X64-BMI2-LABEL: clear_lowbits64_c3_load_indexzext:
708 ; X64-BMI2: # %bb.0:
709 ; X64-BMI2-NEXT: # kill: def $esi killed $esi def $rsi
710 ; X64-BMI2-NEXT: shrxq %rsi, (%rdi), %rax
711 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
712 ; X64-BMI2-NEXT: retq
737 ; X86-BMI2-LABEL: clear_lowbits64_c4_commutative:
738 ; X86-BMI2: # %bb.0:
739 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
740 ; X86-BMI2-NEXT: movl $-1, %edx
741 ; X86-BMI2-NEXT: shlxl %ecx, %edx, %eax
742 ; X86-BMI2-NEXT: testb $32, %cl
743 ; X86-BMI2-NEXT: je .LBB17_2
744 ; X86-BMI2-NEXT: # %bb.1:
745 ; X86-BMI2-NEXT: movl %eax, %edx
746 ; X86-BMI2-NEXT: xorl %eax, %eax
747 ; X86-BMI2-NEXT: .LBB17_2:
748 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %eax
749 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edx
750 ; X86-BMI2-NEXT: retl
761 ; X64-BMI2-LABEL: clear_lowbits64_c4_commutative:
762 ; X64-BMI2: # %bb.0:
763 ; X64-BMI2-NEXT: shrxq %rsi, %rdi, %rax
764 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
765 ; X64-BMI2-NEXT: retq
866 ; X86-BMI2-LABEL: clear_lowbits16_ic0:
867 ; X86-BMI2: # %bb.0:
868 ; X86-BMI2-NEXT: movzwl {{[0-9]+}}(%esp), %eax
869 ; X86-BMI2-NEXT: movb $16, %cl
870 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
871 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
872 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
873 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
874 ; X86-BMI2-NEXT: retl
886 ; X64-BMI2-LABEL: clear_lowbits16_ic0:
887 ; X64-BMI2: # %bb.0:
888 ; X64-BMI2-NEXT: movzwl %di, %eax
889 ; X64-BMI2-NEXT: movb $16, %cl
890 ; X64-BMI2-NEXT: subb %sil, %cl
891 ; X64-BMI2-NEXT: shrxl %ecx, %eax, %eax
892 ; X64-BMI2-NEXT: shlxl %ecx, %eax, %eax
893 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
894 ; X64-BMI2-NEXT: retq
912 ; X86-BMI2-LABEL: clear_lowbits16_ic1_indexzext:
913 ; X86-BMI2: # %bb.0:
914 ; X86-BMI2-NEXT: movzwl {{[0-9]+}}(%esp), %eax
915 ; X86-BMI2-NEXT: movb $16, %cl
916 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
917 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
918 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
919 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
920 ; X86-BMI2-NEXT: retl
932 ; X64-BMI2-LABEL: clear_lowbits16_ic1_indexzext:
933 ; X64-BMI2: # %bb.0:
934 ; X64-BMI2-NEXT: movzwl %di, %eax
935 ; X64-BMI2-NEXT: movb $16, %cl
936 ; X64-BMI2-NEXT: subb %sil, %cl
937 ; X64-BMI2-NEXT: shrxl %ecx, %eax, %eax
938 ; X64-BMI2-NEXT: shlxl %ecx, %eax, %eax
939 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
940 ; X64-BMI2-NEXT: retq
960 ; X86-BMI2-LABEL: clear_lowbits16_ic2_load:
961 ; X86-BMI2: # %bb.0:
962 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
963 ; X86-BMI2-NEXT: movzwl (%eax), %eax
964 ; X86-BMI2-NEXT: movb $16, %cl
965 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
966 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
967 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
968 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
969 ; X86-BMI2-NEXT: retl
981 ; X64-BMI2-LABEL: clear_lowbits16_ic2_load:
982 ; X64-BMI2: # %bb.0:
983 ; X64-BMI2-NEXT: movzwl (%rdi), %eax
984 ; X64-BMI2-NEXT: movb $16, %cl
985 ; X64-BMI2-NEXT: subb %sil, %cl
986 ; X64-BMI2-NEXT: shrxl %ecx, %eax, %eax
987 ; X64-BMI2-NEXT: shlxl %ecx, %eax, %eax
988 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
989 ; X64-BMI2-NEXT: retq
1009 ; X86-BMI2-LABEL: clear_lowbits16_ic3_load_indexzext:
1010 ; X86-BMI2: # %bb.0:
1011 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
1012 ; X86-BMI2-NEXT: movzwl (%eax), %eax
1013 ; X86-BMI2-NEXT: movb $16, %cl
1014 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1015 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
1016 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
1017 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
1018 ; X86-BMI2-NEXT: retl
1030 ; X64-BMI2-LABEL: clear_lowbits16_ic3_load_indexzext:
1031 ; X64-BMI2: # %bb.0:
1032 ; X64-BMI2-NEXT: movzwl (%rdi), %eax
1033 ; X64-BMI2-NEXT: movb $16, %cl
1034 ; X64-BMI2-NEXT: subb %sil, %cl
1035 ; X64-BMI2-NEXT: shrxl %ecx, %eax, %eax
1036 ; X64-BMI2-NEXT: shlxl %ecx, %eax, %eax
1037 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
1038 ; X64-BMI2-NEXT: retq
1058 ; X86-BMI2-LABEL: clear_lowbits16_ic4_commutative:
1059 ; X86-BMI2: # %bb.0:
1060 ; X86-BMI2-NEXT: movzwl {{[0-9]+}}(%esp), %eax
1061 ; X86-BMI2-NEXT: movb $16, %cl
1062 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1063 ; X86-BMI2-NEXT: shrxl %ecx, %eax, %eax
1064 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
1065 ; X86-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
1066 ; X86-BMI2-NEXT: retl
1078 ; X64-BMI2-LABEL: clear_lowbits16_ic4_commutative:
1079 ; X64-BMI2: # %bb.0:
1080 ; X64-BMI2-NEXT: movzwl %di, %eax
1081 ; X64-BMI2-NEXT: movb $16, %cl
1082 ; X64-BMI2-NEXT: subb %sil, %cl
1083 ; X64-BMI2-NEXT: shrxl %ecx, %eax, %eax
1084 ; X64-BMI2-NEXT: shlxl %ecx, %eax, %eax
1085 ; X64-BMI2-NEXT: # kill: def $ax killed $ax killed $eax
1086 ; X64-BMI2-NEXT: retq
1106 ; X86-BMI2-LABEL: clear_lowbits32_ic0:
1107 ; X86-BMI2: # %bb.0:
1108 ; X86-BMI2-NEXT: xorl %eax, %eax
1109 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %al
1110 ; X86-BMI2-NEXT: shrxl %eax, {{[0-9]+}}(%esp), %ecx
1111 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
1112 ; X86-BMI2-NEXT: retl
1124 ; X64-BMI2-LABEL: clear_lowbits32_ic0:
1125 ; X64-BMI2: # %bb.0:
1126 ; X64-BMI2-NEXT: negb %sil
1127 ; X64-BMI2-NEXT: shrxl %esi, %edi, %eax
1128 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
1129 ; X64-BMI2-NEXT: retq
1147 ; X86-BMI2-LABEL: clear_lowbits32_ic1_indexzext:
1148 ; X86-BMI2: # %bb.0:
1149 ; X86-BMI2-NEXT: xorl %eax, %eax
1150 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %al
1151 ; X86-BMI2-NEXT: shrxl %eax, {{[0-9]+}}(%esp), %ecx
1152 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
1153 ; X86-BMI2-NEXT: retl
1165 ; X64-BMI2-LABEL: clear_lowbits32_ic1_indexzext:
1166 ; X64-BMI2: # %bb.0:
1167 ; X64-BMI2-NEXT: negb %sil
1168 ; X64-BMI2-NEXT: shrxl %esi, %edi, %eax
1169 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
1170 ; X64-BMI2-NEXT: retq
1190 ; X86-BMI2-LABEL: clear_lowbits32_ic2_load:
1191 ; X86-BMI2: # %bb.0:
1192 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
1193 ; X86-BMI2-NEXT: xorl %ecx, %ecx
1194 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1195 ; X86-BMI2-NEXT: shrxl %ecx, (%eax), %eax
1196 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
1197 ; X86-BMI2-NEXT: retl
1209 ; X64-BMI2-LABEL: clear_lowbits32_ic2_load:
1210 ; X64-BMI2: # %bb.0:
1211 ; X64-BMI2-NEXT: negb %sil
1212 ; X64-BMI2-NEXT: shrxl %esi, (%rdi), %eax
1213 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
1214 ; X64-BMI2-NEXT: retq
1234 ; X86-BMI2-LABEL: clear_lowbits32_ic3_load_indexzext:
1235 ; X86-BMI2: # %bb.0:
1236 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax
1237 ; X86-BMI2-NEXT: xorl %ecx, %ecx
1238 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1239 ; X86-BMI2-NEXT: shrxl %ecx, (%eax), %eax
1240 ; X86-BMI2-NEXT: shlxl %ecx, %eax, %eax
1241 ; X86-BMI2-NEXT: retl
1253 ; X64-BMI2-LABEL: clear_lowbits32_ic3_load_indexzext:
1254 ; X64-BMI2: # %bb.0:
1255 ; X64-BMI2-NEXT: negb %sil
1256 ; X64-BMI2-NEXT: shrxl %esi, (%rdi), %eax
1257 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
1258 ; X64-BMI2-NEXT: retq
1278 ; X86-BMI2-LABEL: clear_lowbits32_ic4_commutative:
1279 ; X86-BMI2: # %bb.0:
1280 ; X86-BMI2-NEXT: xorl %eax, %eax
1281 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %al
1282 ; X86-BMI2-NEXT: shrxl %eax, {{[0-9]+}}(%esp), %ecx
1283 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %eax
1284 ; X86-BMI2-NEXT: retl
1296 ; X64-BMI2-LABEL: clear_lowbits32_ic4_commutative:
1297 ; X64-BMI2: # %bb.0:
1298 ; X64-BMI2-NEXT: negb %sil
1299 ; X64-BMI2-NEXT: shrxl %esi, %edi, %eax
1300 ; X64-BMI2-NEXT: shlxl %esi, %eax, %eax
1301 ; X64-BMI2-NEXT: retq
1328 ; X86-BMI2-LABEL: clear_lowbits64_ic0:
1329 ; X86-BMI2: # %bb.0:
1330 ; X86-BMI2-NEXT: movb $64, %cl
1331 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1332 ; X86-BMI2-NEXT: movl $-1, %edx
1333 ; X86-BMI2-NEXT: shlxl %ecx, %edx, %eax
1334 ; X86-BMI2-NEXT: testb $32, %cl
1335 ; X86-BMI2-NEXT: je .LBB31_2
1336 ; X86-BMI2-NEXT: # %bb.1:
1337 ; X86-BMI2-NEXT: movl %eax, %edx
1338 ; X86-BMI2-NEXT: xorl %eax, %eax
1339 ; X86-BMI2-NEXT: .LBB31_2:
1340 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %eax
1341 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edx
1342 ; X86-BMI2-NEXT: retl
1354 ; X64-BMI2-LABEL: clear_lowbits64_ic0:
1355 ; X64-BMI2: # %bb.0:
1356 ; X64-BMI2-NEXT: negb %sil
1357 ; X64-BMI2-NEXT: shrxq %rsi, %rdi, %rax
1358 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
1359 ; X64-BMI2-NEXT: retq
1384 ; X86-BMI2-LABEL: clear_lowbits64_ic1_indexzext:
1385 ; X86-BMI2: # %bb.0:
1386 ; X86-BMI2-NEXT: movb $64, %cl
1387 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1388 ; X86-BMI2-NEXT: movl $-1, %edx
1389 ; X86-BMI2-NEXT: shlxl %ecx, %edx, %eax
1390 ; X86-BMI2-NEXT: testb $32, %cl
1391 ; X86-BMI2-NEXT: je .LBB32_2
1392 ; X86-BMI2-NEXT: # %bb.1:
1393 ; X86-BMI2-NEXT: movl %eax, %edx
1394 ; X86-BMI2-NEXT: xorl %eax, %eax
1395 ; X86-BMI2-NEXT: .LBB32_2:
1396 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %eax
1397 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edx
1398 ; X86-BMI2-NEXT: retl
1410 ; X64-BMI2-LABEL: clear_lowbits64_ic1_indexzext:
1411 ; X64-BMI2: # %bb.0:
1412 ; X64-BMI2-NEXT: # kill: def $esi killed $esi def $rsi
1413 ; X64-BMI2-NEXT: negb %sil
1414 ; X64-BMI2-NEXT: shrxq %rsi, %rdi, %rax
1415 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
1416 ; X64-BMI2-NEXT: retq
1445 ; X86-BMI2-LABEL: clear_lowbits64_ic2_load:
1446 ; X86-BMI2: # %bb.0:
1447 ; X86-BMI2-NEXT: pushl %ebx
1448 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
1449 ; X86-BMI2-NEXT: movb $64, %bl
1450 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %bl
1451 ; X86-BMI2-NEXT: movl $-1, %edx
1452 ; X86-BMI2-NEXT: shlxl %ebx, %edx, %eax
1453 ; X86-BMI2-NEXT: testb $32, %bl
1454 ; X86-BMI2-NEXT: je .LBB33_2
1455 ; X86-BMI2-NEXT: # %bb.1:
1456 ; X86-BMI2-NEXT: movl %eax, %edx
1457 ; X86-BMI2-NEXT: xorl %eax, %eax
1458 ; X86-BMI2-NEXT: .LBB33_2:
1459 ; X86-BMI2-NEXT: andl (%ecx), %eax
1460 ; X86-BMI2-NEXT: andl 4(%ecx), %edx
1461 ; X86-BMI2-NEXT: popl %ebx
1462 ; X86-BMI2-NEXT: retl
1474 ; X64-BMI2-LABEL: clear_lowbits64_ic2_load:
1475 ; X64-BMI2: # %bb.0:
1476 ; X64-BMI2-NEXT: negb %sil
1477 ; X64-BMI2-NEXT: shrxq %rsi, (%rdi), %rax
1478 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
1479 ; X64-BMI2-NEXT: retq
1508 ; X86-BMI2-LABEL: clear_lowbits64_ic3_load_indexzext:
1509 ; X86-BMI2: # %bb.0:
1510 ; X86-BMI2-NEXT: pushl %ebx
1511 ; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx
1512 ; X86-BMI2-NEXT: movb $64, %bl
1513 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %bl
1514 ; X86-BMI2-NEXT: movl $-1, %edx
1515 ; X86-BMI2-NEXT: shlxl %ebx, %edx, %eax
1516 ; X86-BMI2-NEXT: testb $32, %bl
1517 ; X86-BMI2-NEXT: je .LBB34_2
1518 ; X86-BMI2-NEXT: # %bb.1:
1519 ; X86-BMI2-NEXT: movl %eax, %edx
1520 ; X86-BMI2-NEXT: xorl %eax, %eax
1521 ; X86-BMI2-NEXT: .LBB34_2:
1522 ; X86-BMI2-NEXT: andl (%ecx), %eax
1523 ; X86-BMI2-NEXT: andl 4(%ecx), %edx
1524 ; X86-BMI2-NEXT: popl %ebx
1525 ; X86-BMI2-NEXT: retl
1537 ; X64-BMI2-LABEL: clear_lowbits64_ic3_load_indexzext:
1538 ; X64-BMI2: # %bb.0:
1539 ; X64-BMI2-NEXT: # kill: def $esi killed $esi def $rsi
1540 ; X64-BMI2-NEXT: negb %sil
1541 ; X64-BMI2-NEXT: shrxq %rsi, (%rdi), %rax
1542 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
1543 ; X64-BMI2-NEXT: retq
1570 ; X86-BMI2-LABEL: clear_lowbits64_ic4_commutative:
1571 ; X86-BMI2: # %bb.0:
1572 ; X86-BMI2-NEXT: movb $64, %cl
1573 ; X86-BMI2-NEXT: subb {{[0-9]+}}(%esp), %cl
1574 ; X86-BMI2-NEXT: movl $-1, %edx
1575 ; X86-BMI2-NEXT: shlxl %ecx, %edx, %eax
1576 ; X86-BMI2-NEXT: testb $32, %cl
1577 ; X86-BMI2-NEXT: je .LBB35_2
1578 ; X86-BMI2-NEXT: # %bb.1:
1579 ; X86-BMI2-NEXT: movl %eax, %edx
1580 ; X86-BMI2-NEXT: xorl %eax, %eax
1581 ; X86-BMI2-NEXT: .LBB35_2:
1582 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %eax
1583 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edx
1584 ; X86-BMI2-NEXT: retl
1596 ; X64-BMI2-LABEL: clear_lowbits64_ic4_commutative:
1597 ; X64-BMI2: # %bb.0:
1598 ; X64-BMI2-NEXT: negb %sil
1599 ; X64-BMI2-NEXT: shrxq %rsi, %rdi, %rax
1600 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax
1601 ; X64-BMI2-NEXT: retq
1631 ; X86-BMI2-LABEL: oneuse32:
1632 ; X86-BMI2: # %bb.0:
1633 ; X86-BMI2-NEXT: pushl %esi
1634 ; X86-BMI2-NEXT: subl $8, %esp
1635 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %al
1636 ; X86-BMI2-NEXT: movl $-1, %ecx
1637 ; X86-BMI2-NEXT: shlxl %eax, %ecx, %esi
1638 ; X86-BMI2-NEXT: movl %esi, (%esp)
1639 ; X86-BMI2-NEXT: calll use32
1640 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %esi
1641 ; X86-BMI2-NEXT: movl %esi, %eax
1642 ; X86-BMI2-NEXT: addl $8, %esp
1643 ; X86-BMI2-NEXT: popl %esi
1644 ; X86-BMI2-NEXT: retl
1665 ; X64-BMI2-LABEL: oneuse32:
1666 ; X64-BMI2: # %bb.0:
1667 ; X64-BMI2-NEXT: pushq %rbp
1668 ; X64-BMI2-NEXT: pushq %rbx
1669 ; X64-BMI2-NEXT: pushq %rax
1670 ; X64-BMI2-NEXT: movl %edi, %ebx
1671 ; X64-BMI2-NEXT: movl $-1, %eax
1672 ; X64-BMI2-NEXT: shlxl %esi, %eax, %ebp
1673 ; X64-BMI2-NEXT: movl %ebp, %edi
1674 ; X64-BMI2-NEXT: callq use32
1675 ; X64-BMI2-NEXT: andl %ebx, %ebp
1676 ; X64-BMI2-NEXT: movl %ebp, %eax
1677 ; X64-BMI2-NEXT: addq $8, %rsp
1678 ; X64-BMI2-NEXT: popq %rbx
1679 ; X64-BMI2-NEXT: popq %rbp
1680 ; X64-BMI2-NEXT: retq
1720 ; X86-BMI2-LABEL: oneuse64:
1721 ; X86-BMI2: # %bb.0:
1722 ; X86-BMI2-NEXT: pushl %edi
1723 ; X86-BMI2-NEXT: pushl %esi
1724 ; X86-BMI2-NEXT: pushl %eax
1725 ; X86-BMI2-NEXT: movb {{[0-9]+}}(%esp), %cl
1726 ; X86-BMI2-NEXT: movl $-1, %esi
1727 ; X86-BMI2-NEXT: shlxl %ecx, %esi, %eax
1728 ; X86-BMI2-NEXT: xorl %edi, %edi
1729 ; X86-BMI2-NEXT: testb $32, %cl
1730 ; X86-BMI2-NEXT: jne .LBB37_1
1731 ; X86-BMI2-NEXT: # %bb.2:
1732 ; X86-BMI2-NEXT: movl %eax, %edi
1733 ; X86-BMI2-NEXT: jmp .LBB37_3
1734 ; X86-BMI2-NEXT: .LBB37_1:
1735 ; X86-BMI2-NEXT: movl %eax, %esi
1736 ; X86-BMI2-NEXT: .LBB37_3:
1737 ; X86-BMI2-NEXT: subl $8, %esp
1738 ; X86-BMI2-NEXT: pushl %esi
1739 ; X86-BMI2-NEXT: pushl %edi
1740 ; X86-BMI2-NEXT: calll use64
1741 ; X86-BMI2-NEXT: addl $16, %esp
1742 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %edi
1743 ; X86-BMI2-NEXT: andl {{[0-9]+}}(%esp), %esi
1744 ; X86-BMI2-NEXT: movl %edi, %eax
1745 ; X86-BMI2-NEXT: movl %esi, %edx
1746 ; X86-BMI2-NEXT: addl $4, %esp
1747 ; X86-BMI2-NEXT: popl %esi
1748 ; X86-BMI2-NEXT: popl %edi
1749 ; X86-BMI2-NEXT: retl
1770 ; X64-BMI2-LABEL: oneuse64:
1771 ; X64-BMI2: # %bb.0:
1772 ; X64-BMI2-NEXT: pushq %r14
1773 ; X64-BMI2-NEXT: pushq %rbx
1774 ; X64-BMI2-NEXT: pushq %rax
1775 ; X64-BMI2-NEXT: movq %rdi, %r14
1776 ; X64-BMI2-NEXT: movq $-1, %rax
1777 ; X64-BMI2-NEXT: shlxq %rsi, %rax, %rbx
1778 ; X64-BMI2-NEXT: movq %rbx, %rdi
1779 ; X64-BMI2-NEXT: callq use64
1780 ; X64-BMI2-NEXT: andq %r14, %rbx
1781 ; X64-BMI2-NEXT: movq %rbx, %rax
1782 ; X64-BMI2-NEXT: addq $8, %rsp
1783 ; X64-BMI2-NEXT: popq %rbx
1784 ; X64-BMI2-NEXT: popq %r14
1785 ; X64-BMI2-NEXT: retq