Commit 1ac3e311 by Richard Earnshaw Committed by Richard Earnshaw

re PR target/14812 (ARM optimizer changes rsb/cmp to cmn, but condition codes different)

	PR target/14812
	* arm.md (addsi3_compare0_for_combiner): Delete.
	(addsi3_compare0_scratch_for_combiner): Delete.
	(cmpsi_neg_shiftsi): Delete.
	(compare_negsi_si): New pattern.
	(cmpsi_negshiftsi_si): New pattern.
	(negated_cbranchsi4): Restrict to equality_operator.

	* arm.md (movhi_insn_arch4): delete trailing white space from assembler
	template.

From-SVN: r97493
parent e5080aa6
2005-04-03 Richard Earnshaw <richard.earnshaw@arm.com>
PR target/14812
* arm.md (addsi3_compare0_for_combiner): Delete.
(addsi3_compare0_scratch_for_combiner): Delete.
(cmpsi_neg_shiftsi): Delete.
(compare_negsi_si): New pattern.
(cmpsi_negshiftsi_si): New pattern.
(negated_cbranchsi4): Restrict to equality_operator.
* arm.md (movhi_insn_arch4): delete trailing white space from assembler
template.
2005-04-03 Kazu Hirata <kazu@cs.umass.edu> 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
* cfghooks.c, cfgrtl.c, modulo-sched.c, config/i386/winnt.c: * cfghooks.c, cfgrtl.c, modulo-sched.c, config/i386/winnt.c:
......
...@@ -571,32 +571,13 @@ ...@@ -571,32 +571,13 @@
[(set_attr "conds" "set")] [(set_attr "conds" "set")]
) )
;; These patterns are the same ones as the two regular addsi3_compare0 (define_insn "*compare_negsi_si"
;; patterns, except we write them slightly different - the combiner [(set (reg:CC_Z CC_REGNUM)
;; tends to generate them this way. (compare:CC_Z
(define_insn "*addsi3_compare0_for_combiner" (neg:SI (match_operand:SI 0 "s_register_operand" "r"))
[(set (reg:CC CC_REGNUM) (match_operand:SI 1 "s_register_operand" "r")))]
(compare:CC
(match_operand:SI 1 "s_register_operand" "r,r")
(neg:SI (match_operand:SI 2 "arm_add_operand" "rI,L"))))
(set (match_operand:SI 0 "s_register_operand" "=r,r")
(plus:SI (match_dup 1) (match_dup 2)))]
"TARGET_ARM"
"@
add%?s\\t%0, %1, %2
sub%?s\\t%0, %1, #%n2"
[(set_attr "conds" "set")]
)
(define_insn "*addsi3_compare0_scratch_for_combiner"
[(set (reg:CC CC_REGNUM)
(compare:CC
(match_operand:SI 0 "s_register_operand" "r,r")
(neg:SI (match_operand:SI 1 "arm_add_operand" "rI,L"))))]
"TARGET_ARM" "TARGET_ARM"
"@ "cmn%?\\t%1, %0"
cmn%?\\t%0, %1
cmp%?\\t%0, #%n1"
[(set_attr "conds" "set")] [(set_attr "conds" "set")]
) )
...@@ -5777,7 +5758,7 @@ ...@@ -5777,7 +5758,7 @@
(define_insn "*negated_cbranchsi4" (define_insn "*negated_cbranchsi4"
[(set (pc) [(set (pc)
(if_then_else (if_then_else
(match_operator 0 "arm_comparison_operator" (match_operator 0 "equality_operator"
[(match_operand:SI 1 "s_register_operand" "l") [(match_operand:SI 1 "s_register_operand" "l")
(neg:SI (match_operand:SI 2 "s_register_operand" "l"))]) (neg:SI (match_operand:SI 2 "s_register_operand" "l"))])
(label_ref (match_operand 3 "" "")) (label_ref (match_operand 3 "" ""))
...@@ -6724,17 +6705,17 @@ ...@@ -6724,17 +6705,17 @@
(const_string "alu_shift_reg")))] (const_string "alu_shift_reg")))]
) )
(define_insn "*cmpsi_neg_shiftsi" (define_insn "*cmpsi_negshiftsi_si"
[(set (reg:CC CC_REGNUM) [(set (reg:CC_Z CC_REGNUM)
(compare:CC (match_operand:SI 0 "s_register_operand" "r") (compare:CC_Z
(neg:SI (match_operator:SI 3 "shift_operator" (neg:SI (match_operator:SI 1 "shift_operator"
[(match_operand:SI 1 "s_register_operand" "r") [(match_operand:SI 2 "s_register_operand" "r")
(match_operand:SI 2 "arm_rhs_operand" "rM")]))))] (match_operand:SI 3 "reg_or_int_operand" "rM")]))
(match_operand:SI 0 "s_register_operand" "r")))]
"TARGET_ARM" "TARGET_ARM"
"cmn%?\\t%0, %1%S3" "cmn%?\\t%0, %2%S1"
[(set_attr "conds" "set") [(set_attr "conds" "set")
(set_attr "shift" "1") (set (attr "type") (if_then_else (match_operand 3 "const_int_operand" "")
(set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "")
(const_string "alu_shift") (const_string "alu_shift")
(const_string "alu_shift_reg")))] (const_string "alu_shift_reg")))]
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment