From c163300de59f203a7042b03145a23db969fd878b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 17 Dec 2018 21:50:06 +0000 Subject: [PATCH] [X86] Add T1MSKC and TZMSK to isDefConvertible used by optimizeCompareInstr. These seem to have been missed when the other TBM instructions were added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349404 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrInfo.cpp | 4 ++++ test/CodeGen/X86/tbm_patterns.ll | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index a0cd1a09d6f..0d356b68ec5 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -3554,6 +3554,10 @@ inline static bool isDefConvertible(MachineInstr &MI) { case X86::BLSFILL64rr: case X86::BLSFILL64rm: case X86::BLSIC32rr: case X86::BLSIC32rm: case X86::BLSIC64rr: case X86::BLSIC64rm: + case X86::T1MSKC32rr: case X86::T1MSKC32rm: + case X86::T1MSKC64rr: case X86::T1MSKC64rm: + case X86::TZMSK32rr: case X86::TZMSK32rm: + case X86::TZMSK64rr: case X86::TZMSK64rm: return true; } } diff --git a/test/CodeGen/X86/tbm_patterns.ll b/test/CodeGen/X86/tbm_patterns.ll index 2b335ea4268..7ebc5dd0d12 100644 --- a/test/CodeGen/X86/tbm_patterns.ll +++ b/test/CodeGen/X86/tbm_patterns.ll @@ -723,7 +723,6 @@ define i32 @test_x86_tbm_t1mskc_u32_z(i32 %a, i32 %b) nounwind { ; CHECK-LABEL: test_x86_tbm_t1mskc_u32_z: ; CHECK: # %bb.0: ; CHECK-NEXT: t1mskcl %edi, %eax -; CHECK-NEXT: testl %eax, %eax ; CHECK-NEXT: cmovel %esi, %eax ; CHECK-NEXT: retq %t0 = xor i32 %a, -1 @@ -767,7 +766,6 @@ define i64 @test_x86_tbm_t1mskc_u64_z(i64 %a, i64 %b) nounwind { ; CHECK-LABEL: test_x86_tbm_t1mskc_u64_z: ; CHECK: # %bb.0: ; CHECK-NEXT: t1mskcq %rdi, %rax -; CHECK-NEXT: testq %rax, %rax ; CHECK-NEXT: cmoveq %rsi, %rax ; CHECK-NEXT: retq %t0 = xor i64 %a, -1 @@ -811,7 +809,6 @@ define i32 @test_x86_tbm_tzmsk_u32_z(i32 %a, i32 %b) nounwind { ; CHECK-LABEL: test_x86_tbm_tzmsk_u32_z: ; CHECK: # %bb.0: ; CHECK-NEXT: tzmskl %edi, %eax -; CHECK-NEXT: testl %eax, %eax ; CHECK-NEXT: cmovel %esi, %eax ; CHECK-NEXT: retq %t0 = xor i32 %a, -1 @@ -855,7 +852,6 @@ define i64 @test_x86_tbm_tzmsk_u64_z(i64 %a, i64 %b) nounwind { ; CHECK-LABEL: test_x86_tbm_tzmsk_u64_z: ; CHECK: # %bb.0: ; CHECK-NEXT: tzmskq %rdi, %rax -; CHECK-NEXT: testq %rax, %rax ; CHECK-NEXT: cmoveq %rsi, %rax ; CHECK-NEXT: retq %t0 = xor i64 %a, -1 -- 2.50.1