diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 15:18:49 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 15:18:49 +0000 |
commit | c429965c31b279c1b03bdfdcae996983cf06632e (patch) | |
tree | c22913f141a234b21391cc1fee6f3ed3aa5a1a7e /gcc/recog.c | |
parent | 48d5ef936a6789741451bd5c111039cba5cb275b (diff) | |
download | gcc-c429965c31b279c1b03bdfdcae996983cf06632e.tar.gz |
2009-04-08 Paolo Bonzini <bonzini@gnu.org>
* recog.c (ordered_comparison_operator): New.
* gensupport.c (std_preds): Add it.
* doc/md.texi (Machine-Independent Predicates): Document it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 70370e3ad81..95f6e9a0965 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1319,6 +1319,32 @@ indirect_operand (rtx op, enum machine_mode mode) && general_operand (XEXP (op, 0), Pmode)); } +/* Return 1 if this is an ordered comparison operator (not including + ORDERED and UNORDERED). */ + +int +ordered_comparison_operator (rtx op, enum machine_mode mode) +{ + if (mode != VOIDmode && GET_MODE (op) != mode) + return false; + switch (GET_CODE (op)) + { + case EQ: + case NE: + case LT: + case LTU: + case LE: + case LEU: + case GT: + case GTU: + case GE: + case GEU: + return true; + default: + return false; + } +} + /* Return 1 if this is a comparison operator. This allows the use of MATCH_OPERATOR to recognize all the branch insns. */ |