diff options
author | David Edelsohn <edelsohn@gnu.org> | 2005-03-04 01:33:45 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2005-03-03 20:33:45 -0500 |
commit | 57a71826b5d4d7d9a23cb02f8a28e105dd6647fe (patch) | |
tree | 6ab32c6b9a201188c2debbb69554421c24cf1fda | |
parent | 1d3206c1608a5dc88cd3586bb9587749623fe30c (diff) | |
download | gcc-57a71826b5d4d7d9a23cb02f8a28e105dd6647fe.zip gcc-57a71826b5d4d7d9a23cb02f8a28e105dd6647fe.tar.gz gcc-57a71826b5d4d7d9a23cb02f8a28e105dd6647fe.tar.bz2 |
predicates.md (branch_comparison_operator): Convert from C block to conditional format.
* config/rs6000/predicates.md (branch_comparison_operator):
Convert from C block to conditional format.
From-SVN: r95864
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/predicates.md | 25 |
2 files changed, 13 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b54469..67c26a2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-03-03 David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/predicates.md (branch_comparison_operator): + Convert from C block to conditional format. + 2005-03-03 Jan Hubicka <jh@suse.cz> * tree-dfa.c (add_referenced_var): Don't walk initializer of external diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 5cafb4c..0f39561 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -677,24 +677,15 @@ (match_code "smin,smax,umin,umax")) ;; Return 1 if OP is a comparison operation that is valid for a branch -;; instruction. We only 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. (define_predicate "branch_comparison_operator" - (match_code "eq,ne,le,lt,ge,gt,leu,ltu,geu,gtu,unordered,ordered,unge,unle") -{ - enum rtx_code code = GET_CODE (op); - enum machine_mode cc_mode; - - if (!COMPARISON_P (op)) - return 0; - - cc_mode = GET_MODE (XEXP (op, 0)); - if (GET_MODE_CLASS (cc_mode) != MODE_CC) - return 0; - - validate_condition_mode (code, cc_mode); - - return 1; -}) + (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_test "GET_MODE_CLASS (GET_MODE (XEXP (op, 0))) == MODE_CC") + (match_test "validate_condition_mode (GET_CODE (op), + GET_MODE (XEXP (op, 0))), + 1"))))) ;; Return 1 if OP is a comparison operation that is valid for an SCC insn -- ;; it must be a positive comparison. |