Commit ede62875 by David Edelsohn Committed by David Edelsohn

predicates.md (branch_comparison_operator): Remove redundant match_code test.

        * config/rs6000/predicates.md (branch_comparison_operator): Remove
        redundant match_code test.
        (scc_comparison_operator): Swap match_operand and match_code
        tests.
        (branch_positive_comparison_operator): Same.
        (trap_comparison_operator): Use comparison_operator and swap with
        match_code test.

From-SVN: r96000
parent 0f2371cb
2005-03-06 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/predicates.md (branch_comparison_operator): Remove
redundant match_code test.
(scc_comparison_operator): Swap match_operand and match_code
tests.
(branch_positive_comparison_operator): Same.
(trap_comparison_operator): Use comparison_operator and swap with
match_code test.
2005-03-06 Marek Michalkiewicz <marekm@amelek.gda.pl> 2005-03-06 Marek Michalkiewicz <marekm@amelek.gda.pl>
PR target/20288 PR target/20288
......
...@@ -680,30 +680,28 @@ ...@@ -680,30 +680,28 @@
;; instruction. We check the opcode against the mode of the CC value. ;; instruction. We check the opcode against the mode of the CC value.
;; validate_condition_mode is an assertion. ;; validate_condition_mode is an assertion.
(define_predicate "branch_comparison_operator" (define_predicate "branch_comparison_operator"
(and (match_code "eq,ne,le,lt,ge,gt,leu,ltu,geu,gtu,unordered,ordered,unge,unle") (and (match_operand 0 "comparison_operator")
(and (match_operand 0 "comparison_operator") (and (match_test "GET_MODE_CLASS (GET_MODE (XEXP (op, 0))) == MODE_CC")
(and (match_test "GET_MODE_CLASS (GET_MODE (XEXP (op, 0))) == MODE_CC") (match_test "validate_condition_mode (GET_CODE (op),
(match_test "validate_condition_mode (GET_CODE (op), GET_MODE (XEXP (op, 0))),
GET_MODE (XEXP (op, 0))), 1"))))
1")))))
;; Return 1 if OP is a comparison operation that is valid for an SCC insn -- ;; Return 1 if OP is a comparison operation that is valid for an SCC insn --
;; it must be a positive comparison. ;; it must be a positive comparison.
(define_predicate "scc_comparison_operator" (define_predicate "scc_comparison_operator"
(and (match_code "eq,lt,gt,ltu,gtu,unordered") (and (match_operand 0 "branch_comparison_operator")
(match_operand 0 "branch_comparison_operator"))) (match_code "eq,lt,gt,ltu,gtu,unordered")))
;; Return 1 if OP is a comparison operation that is valid for a branch ;; Return 1 if OP is a comparison operation that is valid for a branch
;; insn, which is true if the corresponding bit in the CC register is set. ;; insn, which is true if the corresponding bit in the CC register is set.
(define_predicate "branch_positive_comparison_operator" (define_predicate "branch_positive_comparison_operator"
(and (match_code "eq,lt,gt,ltu,gtu,unordered") (and (match_operand 0 "branch_comparison_operator")
(match_operand 0 "branch_comparison_operator"))) (match_code "eq,lt,gt,ltu,gtu,unordered")))
;; Return 1 is OP is a comparison operation that is valid for a trap insn. ;; Return 1 is OP is a comparison operation that is valid for a trap insn.
(define_predicate "trap_comparison_operator" (define_predicate "trap_comparison_operator"
(and (match_code "eq,ne,le,lt,ge,gt,leu,ltu,geu,gtu") (and (match_operand 0 "comparison_operator")
(match_test "(mode == VOIDmode || mode == GET_MODE (op)) (match_code "eq,ne,le,lt,ge,gt,leu,ltu,geu,gtu")))
&& COMPARISON_P (op)")))
;; Return 1 if OP is a load multiple operation, known to be a PARALLEL. ;; Return 1 if OP is a load multiple operation, known to be a PARALLEL.
(define_predicate "load_multiple_operation" (define_predicate "load_multiple_operation"
......
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