From d916f23b8303511cdea8e807c257c76edd6f62e2 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 10 Jul 2019 22:14:39 +0000 Subject: [PATCH] [X86] Add BLSR and BLSMSK to isUseDefConvertible. Unfortunately subo formation in CGP prevents obvious ways of testing this. But we already have BLSI in here and the flag behavior is well understood. Might become more useful if we improve PR42571. llvm-svn: 365702 --- llvm/lib/Target/X86/X86InstrInfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 6ecee41fd037..4a5f77355308 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -3396,7 +3396,12 @@ static X86::CondCode isUseDefConvertible(const MachineInstr &MI) { case X86::BLSI32rr: case X86::BLSI64rr: return X86::COND_AE; - // TODO: BLSR, BLSMSK, and TBM instructions. + case X86::BLSR32rr: + case X86::BLSR64rr: + case X86::BLSMSK32rr: + case X86::BLSMSK64rr: + return X86::COND_B; + // TODO: TBM instructions. } }