diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2014-12-10 21:26:05 +0100 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2014-12-10 20:26:05 +0000 |
commit | 1b457aa45d402df7fbf1dbd818f6d38a4c447aaa (patch) | |
tree | e0456a7b658d50a8d4d9e6f5d4d8aa1587c2f272 /gcc/match.pd | |
parent | 1c4967b998b0171712d7a208c6bb68528a5449a1 (diff) | |
download | gcc-1b457aa45d402df7fbf1dbd818f6d38a4c447aaa.zip gcc-1b457aa45d402df7fbf1dbd818f6d38a4c447aaa.tar.gz gcc-1b457aa45d402df7fbf1dbd818f6d38a4c447aaa.tar.bz2 |
real.h (HONOR_NANS): Replace macro with 3 overloaded declarations.
2014-12-10 Marc Glisse <marc.glisse@inria.fr>
* real.h (HONOR_NANS): Replace macro with 3 overloaded declarations.
* real.c: Include rtl.h and options.h.
(HONOR_NANS): Define three overloads.
* builtins.c (fold_builtin_classify, fold_builtin_unordered_cmp):
Simplify argument of HONOR_NANS.
* fold-const.c (combine_comparisons, fold_truth_not_expr,
fold_cond_expr_with_comparison, merge_truthop_with_opposite_arm,
fold_comparison, fold_binary_loc): Likewise.
* ifcvt.c (noce_try_move, noce_try_minmax): Likewise.
* ipa-inline-analysis.c (add_clause,
set_cond_stmt_execution_predicate): Likewise.
* match.pd: Likewise.
* rtlanal.c (may_trap_p_1): Likewise.
* simplify-rtx.c (simplify_const_relational_operation): Likewise.
* tree-if-conv.c (parse_predicate): Likewise.
* tree-ssa-ccp.c (valid_lattice_transition): Likewise.
* tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
* tree-ssa-phiopt.c (minmax_replacement, neg_replacement): Likewise.
* tree-ssa-reassoc.c (eliminate_using_constants): Likewise.
* tree-ssa-tail-merge.c (gimple_equal_p): Likewise.
From-SVN: r218605
Diffstat (limited to 'gcc/match.pd')
-rw-r--r-- | gcc/match.pd | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 4bee62e..4ccb41a 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -73,7 +73,7 @@ along with GCC; see the file COPYING3. If not see is volatile. */ (simplify (minus @0 @0) - (if (!FLOAT_TYPE_P (type) || !HONOR_NANS (element_mode (type))) + (if (!FLOAT_TYPE_P (type) || !HONOR_NANS (type)) { build_zero_cst (type); })) (simplify @@ -86,8 +86,7 @@ along with GCC; see the file COPYING3. If not see negative value by 0 gives -0, not +0. */ (simplify (mult @0 real_zerop@1) - (if (!HONOR_NANS (element_mode (type)) - && !HONOR_SIGNED_ZEROS (element_mode (type))) + (if (!HONOR_NANS (type) && !HONOR_SIGNED_ZEROS (element_mode (type))) @1)) /* In IEEE floating point, x*1 is not equivalent to x for snans. @@ -150,7 +149,7 @@ along with GCC; see the file COPYING3. If not see (simplify (rdiv @0 @0) (if (FLOAT_TYPE_P (type) - && ! HONOR_NANS (element_mode (type)) + && ! HONOR_NANS (type) && ! HONOR_INFINITIES (element_mode (type))) { build_one_cst (type); })) @@ -159,7 +158,7 @@ along with GCC; see the file COPYING3. If not see (simplify (rdiv:c @0 (negate @0)) (if (FLOAT_TYPE_P (type) - && ! HONOR_NANS (element_mode (type)) + && ! HONOR_NANS (type) && ! HONOR_INFINITIES (element_mode (type))) { build_minus_one_cst (type); })) @@ -905,7 +904,7 @@ along with GCC; see the file COPYING3. If not see a computed operator in the replacement tree thus we have to play the trick below. */ (with { enum tree_code ic = invert_tree_comparison - (cmp, HONOR_NANS (element_mode (@0))); } + (cmp, HONOR_NANS (@0)); } (if (ic == icmp) (icmp @0 @1)) (if (ic == ncmp) @@ -913,7 +912,7 @@ along with GCC; see the file COPYING3. If not see (simplify (bit_xor (cmp @0 @1) integer_truep) (with { enum tree_code ic = invert_tree_comparison - (cmp, HONOR_NANS (element_mode (@0))); } + (cmp, HONOR_NANS (@0)); } (if (ic == icmp) (icmp @0 @1)) (if (ic == ncmp) |