(const_string "*")))
(set_attr "mode" "SI,DI,DI,SI")])
+(define_insn_and_split "*anddi_1_btr"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (and:DI
+ (match_operand:DI 1 "register_operand" "%0")
+ (match_operand:DI 2 "const_int_operand" "n")))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT && TARGET_USE_BT
+ && IN_RANGE (exact_log2 (~INTVAL (operands[2])), 31, 63)"
+ "#"
+ "&& reload_completed"
+ [(parallel [(set (zero_extract:DI (match_dup 0)
+ (const_int 1)
+ (match_dup 3))
+ (const_int 0))
+ (clobber (reg:CC FLAGS_REG))])]
+ "operands[3] = GEN_INT (exact_log2 (~INTVAL (operands[2])));"
+ [(set_attr "type" "alu1")
+ (set_attr "prefix_0f" "1")
+ (set_attr "znver1_decode" "double")
+ (set_attr "mode" "DI")])
+
;; Turn *anddi_1 into *andsi_1_zext if possible.
(define_split
[(set (match_operand:DI 0 "register_operand")
[(set_attr "type" "alu")
(set_attr "mode" "<MODE>")])
+(define_insn_and_split "*iordi_1_bts"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (ior:DI
+ (match_operand:DI 1 "register_operand" "%0")
+ (match_operand:DI 2 "const_int_operand" "n")))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT && TARGET_USE_BT
+ && IN_RANGE (exact_log2 (INTVAL (operands[2])), 31, 63)"
+ "#"
+ "&& reload_completed"
+ [(parallel [(set (zero_extract:DI (match_dup 0)
+ (const_int 1)
+ (match_dup 3))
+ (const_int 1))
+ (clobber (reg:CC FLAGS_REG))])]
+ "operands[3] = GEN_INT (exact_log2 (INTVAL (operands[2])));"
+ [(set_attr "type" "alu1")
+ (set_attr "prefix_0f" "1")
+ (set_attr "znver1_decode" "double")
+ (set_attr "mode" "DI")])
+
+(define_insn_and_split "*xordi_1_btc"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (xor:DI
+ (match_operand:DI 1 "register_operand" "%0")
+ (match_operand:DI 2 "const_int_operand" "n")))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT && TARGET_USE_BT
+ && IN_RANGE (exact_log2 (INTVAL (operands[2])), 31, 63)"
+ "#"
+ "&& reload_completed"
+ [(parallel [(set (zero_extract:DI (match_dup 0)
+ (const_int 1)
+ (match_dup 3))
+ (not:DI (zero_extract:DI (match_dup 0)
+ (const_int 1)
+ (match_dup 3))))
+ (clobber (reg:CC FLAGS_REG))])]
+ "operands[3] = GEN_INT (exact_log2 (INTVAL (operands[2])));"
+ [(set_attr "type" "alu1")
+ (set_attr "prefix_0f" "1")
+ (set_attr "znver1_decode" "double")
+ (set_attr "mode" "DI")])
+
;; See comment for addsi_1_zext why we do use nonimmediate_operand
(define_insn "*<code>si_1_zext"
[(set (match_operand:DI 0 "register_operand" "=r")