@@ -82,25 +82,40 @@ define i32 @t2_commutative(i32 %ptr, i32 %alignment) nounwind {
8282; Extra use tests
8383
8484define i32 @t3_extrause0 (i32 %ptr , i32 %alignment , ptr %mask_storage ) nounwind {
85- ; X86-LABEL: t3_extrause0:
86- ; X86: # %bb.0:
87- ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
88- ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
89- ; X86-NEXT: leal -1( %eax), %edx
90- ; X86-NEXT: movl %edx , (%ecx)
91- ; X86-NEXT: negl %eax
92- ; X86-NEXT: andl {{[0-9]+}}(%esp), %eax
93- ; X86-NEXT: retl
85+ ; NOBMI- X86-LABEL: t3_extrause0:
86+ ; NOBMI- X86: # %bb.0:
87+ ; NOBMI- X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
88+ ; NOBMI- X86-NEXT: movl {{[0-9]+}}(%esp), %eax
89+ ; NOBMI- X86-NEXT: decl %eax
90+ ; NOBMI- X86-NEXT: movl %eax , (%ecx)
91+ ; NOBMI- X86-NEXT: notl %eax
92+ ; NOBMI- X86-NEXT: andl {{[0-9]+}}(%esp), %eax
93+ ; NOBMI- X86-NEXT: retl
9494;
95- ; X64-LABEL: t3_extrause0:
96- ; X64: # %bb.0:
97- ; X64-NEXT: movl %esi, %eax
98- ; X64-NEXT: leal -1(%rax), %ecx
99- ; X64-NEXT: movl %ecx, (%rdx)
100- ; X64-NEXT: negl %eax
101- ; X64-NEXT: andl %edi, %eax
102- ; X64-NEXT: # kill: def $eax killed $eax killed $rax
103- ; X64-NEXT: retq
95+ ; BMI-X86-LABEL: t3_extrause0:
96+ ; BMI-X86: # %bb.0:
97+ ; BMI-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
98+ ; BMI-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
99+ ; BMI-X86-NEXT: decl %ecx
100+ ; BMI-X86-NEXT: movl %ecx, (%eax)
101+ ; BMI-X86-NEXT: andnl {{[0-9]+}}(%esp), %ecx, %eax
102+ ; BMI-X86-NEXT: retl
103+ ;
104+ ; NOBMI-X64-LABEL: t3_extrause0:
105+ ; NOBMI-X64: # %bb.0:
106+ ; NOBMI-X64-NEXT: # kill: def $esi killed $esi def $rsi
107+ ; NOBMI-X64-NEXT: leal -1(%rsi), %eax
108+ ; NOBMI-X64-NEXT: movl %eax, (%rdx)
109+ ; NOBMI-X64-NEXT: notl %eax
110+ ; NOBMI-X64-NEXT: andl %edi, %eax
111+ ; NOBMI-X64-NEXT: retq
112+ ;
113+ ; BMI-X64-LABEL: t3_extrause0:
114+ ; BMI-X64: # %bb.0:
115+ ; BMI-X64-NEXT: decl %esi
116+ ; BMI-X64-NEXT: movl %esi, (%rdx)
117+ ; BMI-X64-NEXT: andnl %edi, %esi, %eax
118+ ; BMI-X64-NEXT: retq
104119 %mask = add i32 %alignment , -1
105120 store i32 %mask , ptr %mask_storage
106121 %bias = and i32 %ptr , %mask
0 commit comments