https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104982
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Hongtao.liu from comment #4) > I'm testing > > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md > index 02f298c2846..c74edd1aaef 100644 > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -14182,12 +14182,12 @@ (define_insn_and_split "*jcc_bt<mode>_mask" > (define_split > [(set (match_operand:SWI248 0 "register_operand") > (if_then_else:SWI248 > - (ne > - (zero_extract:SWI48 > - (match_operand:SWI48 1 "register_operand") > - (const_int 1) > - (zero_extend:SI (match_operand:QI 2 "register_operand"))) > - (const_int 0)) > + (match_operator 5 "bt_comparison_operator" > + [(zero_extract:SWI48 > + (match_operand:SWI48 1 "register_operand") > + (const_int 1) > + (zero_extend:SI (match_operand:QI 2 "register_operand"))) > + (const_int 0)]) > (match_operand:SWI248 3 "nonimmediate_operand") > (match_operand:SWI248 4 "nonimmediate_operand")))] > "TARGET_USE_BT && TARGET_CMOVE > @@ -14202,6 +14202,8 @@ (define_split > (match_dup 3) > (match_dup 4)))] > { > + if (GET_CODE (operands[5]) == EQ) > + std::swap (operands[3], operands[4]); > operands[2] = lowpart_subreg (SImode, operands[2], QImode); > }) Ah, yeah - I was hoping for a solution like this.