aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-10 20:26:05 +0000
committerglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-10 20:26:05 +0000
commit93633022f2517f10aa1d500681a84ffa4730d842 (patch)
treee0456a7b658d50a8d4d9e6f5d4d8aa1587c2f272 /gcc/builtins.c
parentfdf7662c3772cf44f86cbf7cca56fc39aa8012fc (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 7cbac60851c..0d3198118c0 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -9607,7 +9607,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index)
}
case BUILT_IN_ISFINITE:
- if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg)))
+ if (!HONOR_NANS (arg)
&& !HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
return omit_one_operand_loc (loc, type, integer_one_node, arg);
@@ -9620,7 +9620,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index)
return NULL_TREE;
case BUILT_IN_ISNAN:
- if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg))))
+ if (!HONOR_NANS (arg))
return omit_one_operand_loc (loc, type, integer_zero_node, arg);
if (TREE_CODE (arg) == REAL_CST)
@@ -9748,13 +9748,12 @@ fold_builtin_unordered_cmp (location_t loc, tree fndecl, tree arg0, tree arg1,
if (unordered_code == UNORDERED_EXPR)
{
- if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))))
+ if (!HONOR_NANS (arg0))
return omit_two_operands_loc (loc, type, integer_zero_node, arg0, arg1);
return fold_build2_loc (loc, UNORDERED_EXPR, type, arg0, arg1);
}
- code = HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code
- : ordered_code;
+ code = HONOR_NANS (arg0) ? unordered_code : ordered_code;
return fold_build1_loc (loc, TRUTH_NOT_EXPR, type,
fold_build2_loc (loc, code, type, arg0, arg1));
}