aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-12 10:46:00 +0000
committerglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-12 10:46:00 +0000
commitfe994837ef9af6599a13896b51ae4628bea8dd95 (patch)
tree6e8c286bbdbceedd094b4c74d98033969cce3446 /gcc/builtins.c
parenta530bcf4c54d7b335d5af168b0409347446104b1 (diff)
2014-12-12 Marc Glisse <marc.glisse@inria.fr>
* real.h (HONOR_SNANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING): Replace macros with 3 overloaded declarations. * real.c (HONOR_NANS): Fix indentation. (HONOR_SNANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING): Define three overloads. * builtins.c (fold_builtin_cproj, fold_builtin_signbit, fold_builtin_fmin_fmax, fold_builtin_classify): Simplify argument of HONOR_*. * fold-const.c (operand_equal_p, fold_comparison, fold_binary_loc): Likewise. * gimple-fold.c (gimple_val_nonnegative_real_p): Likewise. * ifcvt.c (noce_try_move, noce_try_minmax, noce_try_abs): Likewise. * omp-low.c (omp_reduction_init): Likewise. * rtlanal.c (may_trap_p_1): Likewise. * simplify-rtx.c (simplify_const_relational_operation): Likewise. * tree-ssa-dom.c (record_equality, record_edge_info): Likewise. * tree-ssa-phiopt.c (value_replacement, abs_replacement): Likewise. * tree-ssa-reassoc.c (eliminate_using_constants): Likewise. * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218663 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 0d3198118c0..445bff20098 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -7678,7 +7678,7 @@ fold_builtin_cproj (location_t loc, tree arg, tree type)
return NULL_TREE;
/* If there are no infinities, return arg. */
- if (! HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (type))))
+ if (! HONOR_INFINITIES (type))
return non_lvalue_loc (loc, arg);
/* Calculate the result when the argument is a constant. */
@@ -8949,7 +8949,7 @@ fold_builtin_signbit (location_t loc, tree arg, tree type)
return omit_one_operand_loc (loc, type, integer_zero_node, arg);
/* If ARG's format doesn't have signed zeros, return "arg < 0.0". */
- if (!HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (arg))))
+ if (!HONOR_SIGNED_ZEROS (arg))
return fold_convert (type,
fold_build2_loc (loc, LT_EXPR, boolean_type_node, arg,
build_real (TREE_TYPE (arg), dconst0)));
@@ -9143,12 +9143,12 @@ fold_builtin_fmin_fmax (location_t loc, tree arg0, tree arg1,
omit_one_operand() ensures we create a non-lvalue. */
if (TREE_CODE (arg0) == REAL_CST
&& real_isnan (&TREE_REAL_CST (arg0))
- && (! HONOR_SNANS (TYPE_MODE (TREE_TYPE (arg0)))
+ && (! HONOR_SNANS (arg0)
|| ! TREE_REAL_CST (arg0).signalling))
return omit_one_operand_loc (loc, type, arg1, arg0);
if (TREE_CODE (arg1) == REAL_CST
&& real_isnan (&TREE_REAL_CST (arg1))
- && (! HONOR_SNANS (TYPE_MODE (TREE_TYPE (arg1)))
+ && (! HONOR_SNANS (arg1)
|| ! TREE_REAL_CST (arg1).signalling))
return omit_one_operand_loc (loc, type, arg0, arg1);
@@ -9559,7 +9559,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index)
switch (builtin_index)
{
case BUILT_IN_ISINF:
- if (!HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
+ if (!HONOR_INFINITIES (arg))
return omit_one_operand_loc (loc, type, integer_zero_node, arg);
if (TREE_CODE (arg) == REAL_CST)
@@ -9608,7 +9608,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index)
case BUILT_IN_ISFINITE:
if (!HONOR_NANS (arg)
- && !HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
+ && !HONOR_INFINITIES (arg))
return omit_one_operand_loc (loc, type, integer_one_node, arg);
if (TREE_CODE (arg) == REAL_CST)