https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80813
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Combine constructs: (set (reg:CCZ 17 flags) (compare:CCZ (zero_extract:DI (mem:DI (plus:DI (mult:DI (reg:DI 111 [ _8 ]) (const_int 8 [0x8])) (reg/f:DI 112 [ v_2(D)->D.25666._M_impl.D.25135._M_start.D.16486._M_p ])) [3 *_10+0 S8 A64]) (const_int 1 [0x1]) (subreg:QI (reg:SI 116 [ _12 ]) 0)) (const_int 0 [0]))) While bt pattern is: (define_insn "*bt<mode>" [(set (reg:CCC FLAGS_REG) (compare:CCC (zero_extract:SWI48 (match_operand:SWI48 0 "nonimmediate_operand" "r,m") (const_int 1) (match_operand:QI 1 "nonmemory_operand" "q<S>,<S>")) (const_int 0)))] "" { switch (get_attr_mode (insn)) { case MODE_SI: return "bt{l}\t{%k1, %k0|%k0, %k1}"; case MODE_DI: return "bt{q}\t{%q1, %0|%0, %q1}"; default: gcc_unreachable (); } } [(set_attr "type" "alu1") (set_attr "prefix_0f" "1") (set (attr "mode") (if_then_else (and (match_test "CONST_INT_P (operands[1])") (match_test "INTVAL (operands[1]) < 32")) (const_string "SI") (const_string "<MODE>")))]) It fails since BT produces carry while we want zero flag...