(define_insn "*bt<mode>"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
+ (const_int 0)
(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)))]
+ (match_operand:QI 1 "nonmemory_operand" "q<S>,<S>"))))]
""
{
switch (get_attr_mode (insn))
(define_insn_and_split "*bt<SWI48:mode>_mask"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
+ (const_int 0)
(zero_extract:SWI48
(match_operand:SWI48 0 "nonimmediate_operand" "r,m")
(const_int 1)
(subreg:QI
(and:SWI248
(match_operand:SWI248 1 "register_operand")
- (match_operand 2 "const_int_operand")) 0))
- (const_int 0)))]
+ (match_operand 2 "const_int_operand")) 0))))]
"TARGET_USE_BT
&& (INTVAL (operands[2]) & (GET_MODE_BITSIZE (<SWI48:MODE>mode)-1))
== GET_MODE_BITSIZE (<SWI48:MODE>mode)-1
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 0) (const_int 1) (match_dup 1))
- (const_int 0)))]
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 0) (const_int 1) (match_dup 1))))]
"operands[1] = gen_lowpart (QImode, operands[1]);")
(define_insn_and_split "*jcc_bt<mode>"
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
+ (const_int 0)
(zero_extract:SWI48
(match_dup 1)
(const_int 1)
- (match_dup 2))
- (const_int 0)))
+ (match_dup 2))))
(set (pc)
(if_then_else (match_op_dup 0 [(reg:CCC FLAGS_REG) (const_int 0)])
(label_ref (match_dup 3))
(pc)))]
{
operands[0] = shallow_copy_rtx (operands[0]);
- PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0])));
+ PUT_CODE (operands[0], GET_CODE (operands[0]) == NE ? LTU : GEU);
})
;; Avoid useless masking of bit offset operand.
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
+ (const_int 0)
(zero_extract:SWI48
(match_dup 1)
(const_int 1)
- (match_dup 2))
- (const_int 0)))
+ (match_dup 2))))
(set (pc)
(if_then_else (match_op_dup 0 [(reg:CCC FLAGS_REG) (const_int 0)])
(label_ref (match_dup 4))
(pc)))]
{
operands[0] = shallow_copy_rtx (operands[0]);
- PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0])));
+ PUT_CODE (operands[0], GET_CODE (operands[0]) == NE ? LTU : GEU);
})
;; Avoid useless masking of bit offset operand.
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
+ (const_int 0)
(zero_extract:SWI48
(match_dup 1)
(const_int 1)
- (match_dup 2))
- (const_int 0)))
+ (match_dup 2))))
(set (pc)
(if_then_else (match_op_dup 0 [(reg:CCC FLAGS_REG) (const_int 0)])
(label_ref (match_dup 4))
(pc)))]
{
operands[0] = shallow_copy_rtx (operands[0]);
- PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0])));
+ PUT_CODE (operands[0], GET_CODE (operands[0]) == NE ? LTU : GEU);
operands[2] = gen_lowpart (QImode, operands[2]);
})
&& ix86_pre_reload_split ()"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
- (const_int 0)))
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))))
(set (match_dup 0)
- (if_then_else:SWI248 (eq (reg:CCC FLAGS_REG) (const_int 0))
+ (if_then_else:SWI248 (ltu (reg:CCC FLAGS_REG) (const_int 0))
(match_dup 3)
(match_dup 4)))]
{
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
- (const_int 0)))
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))))
(set (match_dup 0)
- (eq:QI (reg:CCC FLAGS_REG) (const_int 0)))])
+ (ltu:QI (reg:CCC FLAGS_REG) (const_int 0)))])
;; Help combine recognize bt followed by setnc
(define_insn_and_split "*bt<mode>_setncqi"
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
- (const_int 0)))
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))))
(set (match_dup 0)
- (ne:QI (reg:CCC FLAGS_REG) (const_int 0)))])
+ (geu:QI (reg:CCC FLAGS_REG) (const_int 0)))])
(define_insn_and_split "*bt<mode>_setnc<mode>"
[(set (match_operand:SWI48 0 "register_operand")
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
- (const_int 0)))
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))))
(set (match_dup 3)
- (ne:QI (reg:CCC FLAGS_REG) (const_int 0)))
+ (geu:QI (reg:CCC FLAGS_REG) (const_int 0)))
(set (match_dup 0) (zero_extend:SWI48 (match_dup 3)))]
"operands[3] = gen_reg_rtx (QImode);")
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
- (const_int 0)))
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))))
(set (match_dup 0)
- (ne:QI (reg:CCC FLAGS_REG) (const_int 0)))])
+ (geu:QI (reg:CCC FLAGS_REG) (const_int 0)))])
;; Help combine recognize bt followed by setc
(define_insn_and_split "*bt<mode>_setc<mode>_mask"
"&& 1"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
- (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
- (const_int 0)))
+ (const_int 0)
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))))
(set (match_dup 3)
- (eq:QI (reg:CCC FLAGS_REG) (const_int 0)))
+ (ltu:QI (reg:CCC FLAGS_REG) (const_int 0)))
(set (match_dup 0) (zero_extend:SWI48 (match_dup 3)))]
{
operands[2] = gen_lowpart (QImode, operands[2]);