diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-28 16:37:08 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-28 16:37:08 +0000 |
commit | 318a728f904732ccea8f616d2694af282ccfc848 (patch) | |
tree | 7ddeb479040eb4166d908a90967e3c0027eb6800 /gcc/expr.c | |
parent | cdf460bd0fc42b4da0b4a3b46cba3dfaf6940e11 (diff) | |
download | gcc-318a728f904732ccea8f616d2694af282ccfc848.tar.gz |
gcc/ChangeLog:
2004-05-27 Paolo Bonzini <bonzini@gnu.org>
Roger Sayle <roger@eyesopen.com>
PR rtl-optimization/15649
Add LTGT_EXPR and improve pretty-printing of unordered
comparisons.
* c-common.c (c_common_truthvalue_conversion):
Handle LTGT_EXPR.
* c-typeck.c (build_binary_op): Likewise.
* dojump.c (do_jump): Likewise.
* expr.c (expand_expr_real_1, do_store_flag): Likewise.
* predict.c (tree_predict_by_opcode): Likewise.
* real.c (real_compare): Likewise.
* tree-cfg.c (verify_expr): Likewise.
* tree-inline.c (estimate_num_insns_1): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
Handle ORDERED_EXPR, UNORDERED_EXPR.
(op_symbol): Print unordered comparisons differently
than ordered ones.
* tree.def (LTGT_EXPR): New '<' tree code.
* doc/c-tree.texi (Expressions): Document floating-point
comparison nodes.
Fold comparisons between floating point values.
* fold-const.c (enum comparison_code): New, from
#define'd constants. Define compcodes for unordered
comparisons and for invalid transformations.
(invert_tree_comparison): Add "honor_nans" parameter.
(fold_truthop): Revamp to work on floating-point types too.
(comparison_to_compcode): Support unordered comparisons.
Use new enum comparison_code.
(compcode_to_comparison): Likewise.
(combine_compcodes): New function.
(invert_truthvalue): Let invert_tree_comparison decide
whether it is valid to fold the comparison. Fold ORDERED
and UNORDERED even if flag_unsafe_math_optimizations is off,
and the remaining even if flag_unsafe_math_optimizations
is off but we are under -fno-trapping-math.
(fold_relational_const): Integer modes do not honor NaNs.
gcc/testsuite/ChangeLog:
2004-05-27 Paolo Bonzini <bonzini@gnu.org>
* gcc.c-torture/compare-fp-1.c, gcc.c-torture/compare-fp-2.c,
gcc.c-torture/compare-fp-3.c, gcc.c-torture/compare-fp-4.c,
gcc.c-torture/compare-fp-3.x, gcc.c-torture/compare-fp-4.x,
gcc.c-torture/pr15649-1.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82365 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 5aa3efaa23d..a4357cdcfdb 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -8305,6 +8305,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, case UNGT_EXPR: case UNGE_EXPR: case UNEQ_EXPR: + case LTGT_EXPR: temp = do_store_flag (exp, modifier != EXPAND_STACK_PARM ? target : NULL_RTX, tmode != VOIDmode ? tmode : mode, 0); @@ -9815,6 +9816,9 @@ do_store_flag (tree exp, rtx target, enum machine_mode mode, int only_cheap) case UNEQ_EXPR: code = UNEQ; break; + case LTGT_EXPR: + code = LTGT; + break; default: abort (); |