diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/bmi.ll | 24 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/tbm_patterns.ll | 27 |
2 files changed, 12 insertions, 39 deletions
diff --git a/llvm/test/CodeGen/X86/bmi.ll b/llvm/test/CodeGen/X86/bmi.ll index 5642f7c6e43..03d6df03c31 100644 --- a/llvm/test/CodeGen/X86/bmi.ll +++ b/llvm/test/CodeGen/X86/bmi.ll @@ -519,10 +519,7 @@ define i32 @blsi32_z(i32 %a, i32 %b) nounwind { define i32 @blsi32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; X86-LABEL: blsi32_z2: ; X86: # %bb.0: -; X86-NEXT: movl {{[0-9]+}}(%esp), %eax -; X86-NEXT: movl %eax, %ecx -; X86-NEXT: negl %ecx -; X86-NEXT: testl %eax, %ecx +; X86-NEXT: blsil {{[0-9]+}}(%esp), %eax ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax ; X86-NEXT: leal {{[0-9]+}}(%esp), %ecx ; X86-NEXT: cmovel %eax, %ecx @@ -532,9 +529,7 @@ define i32 @blsi32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; X64-LABEL: blsi32_z2: ; X64: # %bb.0: ; X64-NEXT: movl %esi, %eax -; X64-NEXT: movl %edi, %ecx -; X64-NEXT: negl %ecx -; X64-NEXT: testl %edi, %ecx +; X64-NEXT: blsil %edi, %ecx ; X64-NEXT: cmovnel %edx, %eax ; X64-NEXT: retq %t0 = sub i32 0, %a @@ -629,9 +624,7 @@ define i64 @blsi64_z2(i64 %a, i64 %b, i64 %c) nounwind { ; X64-LABEL: blsi64_z2: ; X64: # %bb.0: ; X64-NEXT: movq %rsi, %rax -; X64-NEXT: movq %rdi, %rcx -; X64-NEXT: negq %rcx -; X64-NEXT: testq %rdi, %rcx +; X64-NEXT: blsiq %rdi, %rcx ; X64-NEXT: cmovneq %rdx, %rax ; X64-NEXT: retq %t0 = sub i64 0, %a @@ -875,9 +868,7 @@ define i32 @blsr32_z(i32 %a, i32 %b) nounwind { define i32 @blsr32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; X86-LABEL: blsr32_z2: ; X86: # %bb.0: -; X86-NEXT: movl {{[0-9]+}}(%esp), %eax -; X86-NEXT: leal -1(%eax), %ecx -; X86-NEXT: testl %eax, %ecx +; X86-NEXT: blsrl {{[0-9]+}}(%esp), %eax ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax ; X86-NEXT: leal {{[0-9]+}}(%esp), %ecx ; X86-NEXT: cmovel %eax, %ecx @@ -887,9 +878,7 @@ define i32 @blsr32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; X64-LABEL: blsr32_z2: ; X64: # %bb.0: ; X64-NEXT: movl %esi, %eax -; X64-NEXT: # kill: def $edi killed $edi def $rdi -; X64-NEXT: leal -1(%rdi), %ecx -; X64-NEXT: testl %edi, %ecx +; X64-NEXT: blsrl %edi, %ecx ; X64-NEXT: cmovnel %edx, %eax ; X64-NEXT: retq %t0 = sub i32 %a, 1 @@ -984,8 +973,7 @@ define i64 @blsr64_z2(i64 %a, i64 %b, i64 %c) nounwind { ; X64-LABEL: blsr64_z2: ; X64: # %bb.0: ; X64-NEXT: movq %rsi, %rax -; X64-NEXT: leaq -1(%rdi), %rcx -; X64-NEXT: testq %rdi, %rcx +; X64-NEXT: blsrq %rdi, %rcx ; X64-NEXT: cmovneq %rdx, %rax ; X64-NEXT: retq %t0 = sub i64 %a, 1 diff --git a/llvm/test/CodeGen/X86/tbm_patterns.ll b/llvm/test/CodeGen/X86/tbm_patterns.ll index 7ebc5dd0d12..65cc92ca853 100644 --- a/llvm/test/CodeGen/X86/tbm_patterns.ll +++ b/llvm/test/CodeGen/X86/tbm_patterns.ll @@ -150,9 +150,7 @@ define i32 @test_x86_tbm_blcfill_u32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; CHECK-LABEL: test_x86_tbm_blcfill_u32_z2: ; CHECK: # %bb.0: ; CHECK-NEXT: movl %esi, %eax -; CHECK-NEXT: # kill: def $edi killed $edi def $rdi -; CHECK-NEXT: leal 1(%rdi), %ecx -; CHECK-NEXT: testl %edi, %ecx +; CHECK-NEXT: blcfilll %edi, %ecx ; CHECK-NEXT: cmovnel %edx, %eax ; CHECK-NEXT: retq %t0 = add i32 %a, 1 @@ -189,8 +187,7 @@ define i64 @test_x86_tbm_blcfill_u64_z2(i64 %a, i64 %b, i64 %c) nounwind { ; CHECK-LABEL: test_x86_tbm_blcfill_u64_z2: ; CHECK: # %bb.0: ; CHECK-NEXT: movq %rsi, %rax -; CHECK-NEXT: leaq 1(%rdi), %rcx -; CHECK-NEXT: testq %rdi, %rcx +; CHECK-NEXT: blcfillq %rdi, %rcx ; CHECK-NEXT: cmovneq %rdx, %rax ; CHECK-NEXT: retq %t0 = add i64 %a, 1 @@ -334,10 +331,7 @@ define i32 @test_x86_tbm_blcic_u32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; CHECK-LABEL: test_x86_tbm_blcic_u32_z2: ; CHECK: # %bb.0: ; CHECK-NEXT: movl %esi, %eax -; CHECK-NEXT: movl %edi, %ecx -; CHECK-NEXT: notl %ecx -; CHECK-NEXT: incl %edi -; CHECK-NEXT: testl %ecx, %edi +; CHECK-NEXT: blcicl %edi, %ecx ; CHECK-NEXT: cmovnel %edx, %eax ; CHECK-NEXT: retq %t0 = xor i32 %a, -1 @@ -377,10 +371,7 @@ define i64 @test_x86_tbm_blcic_u64_z2(i64 %a, i64 %b, i64 %c) nounwind { ; CHECK-LABEL: test_x86_tbm_blcic_u64_z2: ; CHECK: # %bb.0: ; CHECK-NEXT: movq %rsi, %rax -; CHECK-NEXT: movq %rdi, %rcx -; CHECK-NEXT: notq %rcx -; CHECK-NEXT: incq %rdi -; CHECK-NEXT: testq %rcx, %rdi +; CHECK-NEXT: blcicq %rdi, %rcx ; CHECK-NEXT: cmovneq %rdx, %rax ; CHECK-NEXT: retq %t0 = xor i64 %a, -1 @@ -823,10 +814,7 @@ define i32 @test_x86_tbm_tzmsk_u32_z2(i32 %a, i32 %b, i32 %c) nounwind { ; CHECK-LABEL: test_x86_tbm_tzmsk_u32_z2: ; CHECK: # %bb.0: ; CHECK-NEXT: movl %esi, %eax -; CHECK-NEXT: movl %edi, %ecx -; CHECK-NEXT: notl %ecx -; CHECK-NEXT: decl %edi -; CHECK-NEXT: testl %edi, %ecx +; CHECK-NEXT: tzmskl %edi, %ecx ; CHECK-NEXT: cmovnel %edx, %eax ; CHECK-NEXT: retq %t0 = xor i32 %a, -1 @@ -866,10 +854,7 @@ define i64 @test_x86_tbm_tzmsk_u64_z2(i64 %a, i64 %b, i64 %c) nounwind { ; CHECK-LABEL: test_x86_tbm_tzmsk_u64_z2: ; CHECK: # %bb.0: ; CHECK-NEXT: movq %rsi, %rax -; CHECK-NEXT: movq %rdi, %rcx -; CHECK-NEXT: notq %rcx -; CHECK-NEXT: decq %rdi -; CHECK-NEXT: testq %rdi, %rcx +; CHECK-NEXT: tzmskq %rdi, %rcx ; CHECK-NEXT: cmovneq %rdx, %rax ; CHECK-NEXT: retq %t0 = xor i64 %a, -1 |

