Skip to content

Commit 8c9d772

Browse files
committed
[X86] Add T1MSKC and TZMSK to isDefConvertible used by optimizeCompareInstr.
These seem to have been missed when the other TBM instructions were added. llvm-svn: 349404
1 parent 94ee072 commit 8c9d772

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Target/X86/X86InstrInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3554,6 +3554,10 @@ inline static bool isDefConvertible(MachineInstr &MI) {
35543554
case X86::BLSFILL64rr: case X86::BLSFILL64rm:
35553555
case X86::BLSIC32rr: case X86::BLSIC32rm:
35563556
case X86::BLSIC64rr: case X86::BLSIC64rm:
3557+
case X86::T1MSKC32rr: case X86::T1MSKC32rm:
3558+
case X86::T1MSKC64rr: case X86::T1MSKC64rm:
3559+
case X86::TZMSK32rr: case X86::TZMSK32rm:
3560+
case X86::TZMSK64rr: case X86::TZMSK64rm:
35573561
return true;
35583562
}
35593563
}

llvm/test/CodeGen/X86/tbm_patterns.ll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ define i32 @test_x86_tbm_t1mskc_u32_z(i32 %a, i32 %b) nounwind {
723723
; CHECK-LABEL: test_x86_tbm_t1mskc_u32_z:
724724
; CHECK: # %bb.0:
725725
; CHECK-NEXT: t1mskcl %edi, %eax
726-
; CHECK-NEXT: testl %eax, %eax
727726
; CHECK-NEXT: cmovel %esi, %eax
728727
; CHECK-NEXT: retq
729728
%t0 = xor i32 %a, -1
@@ -767,7 +766,6 @@ define i64 @test_x86_tbm_t1mskc_u64_z(i64 %a, i64 %b) nounwind {
767766
; CHECK-LABEL: test_x86_tbm_t1mskc_u64_z:
768767
; CHECK: # %bb.0:
769768
; CHECK-NEXT: t1mskcq %rdi, %rax
770-
; CHECK-NEXT: testq %rax, %rax
771769
; CHECK-NEXT: cmoveq %rsi, %rax
772770
; CHECK-NEXT: retq
773771
%t0 = xor i64 %a, -1
@@ -811,7 +809,6 @@ define i32 @test_x86_tbm_tzmsk_u32_z(i32 %a, i32 %b) nounwind {
811809
; CHECK-LABEL: test_x86_tbm_tzmsk_u32_z:
812810
; CHECK: # %bb.0:
813811
; CHECK-NEXT: tzmskl %edi, %eax
814-
; CHECK-NEXT: testl %eax, %eax
815812
; CHECK-NEXT: cmovel %esi, %eax
816813
; CHECK-NEXT: retq
817814
%t0 = xor i32 %a, -1
@@ -855,7 +852,6 @@ define i64 @test_x86_tbm_tzmsk_u64_z(i64 %a, i64 %b) nounwind {
855852
; CHECK-LABEL: test_x86_tbm_tzmsk_u64_z:
856853
; CHECK: # %bb.0:
857854
; CHECK-NEXT: tzmskq %rdi, %rax
858-
; CHECK-NEXT: testq %rax, %rax
859855
; CHECK-NEXT: cmoveq %rsi, %rax
860856
; CHECK-NEXT: retq
861857
%t0 = xor i64 %a, -1

0 commit comments

Comments
 (0)