diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-09-01 17:00:14 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-09-02 21:35:21 +0200 |
commit | bb9d434404b559a11bd2f85f0ce8085c77b8c4c8 (patch) | |
tree | 86bf50ea24d0294bdcf00a51b2ac3352fa532126 /gcc/builtins.cc | |
parent | 68c23af0dd7403c95c43310edc15669d4dacb005 (diff) | |
download | gcc-bb9d434404b559a11bd2f85f0ce8085c77b8c4c8.zip gcc-bb9d434404b559a11bd2f85f0ce8085c77b8c4c8.tar.gz gcc-bb9d434404b559a11bd2f85f0ce8085c77b8c4c8.tar.bz2 |
Convert rest of compiler to dconst[n]inf.
gcc/ChangeLog:
* builtins.cc (fold_builtin_inf): Convert use of real_info to dconstinf.
(fold_builtin_fpclassify): Same.
* fold-const-call.cc (fold_const_call_cc): Same.
* match.pd: Same.
* omp-low.cc (omp_reduction_init_op): Same.
* realmpfr.cc (real_from_mpfr): Same.
* tree.cc (build_complex_inf): Same.
Diffstat (limited to 'gcc/builtins.cc')
-rw-r--r-- | gcc/builtins.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/builtins.cc b/gcc/builtins.cc index f1f7c0c..5f319b2 100644 --- a/gcc/builtins.cc +++ b/gcc/builtins.cc @@ -8696,8 +8696,6 @@ fold_builtin_strlen (location_t loc, tree expr, tree type, tree arg) static tree fold_builtin_inf (location_t loc, tree type, int warn) { - REAL_VALUE_TYPE real; - /* __builtin_inff is intended to be usable to define INFINITY on all targets. If an infinity is not available, INFINITY expands "to a positive constant of type float that overflows at translation @@ -8708,8 +8706,7 @@ fold_builtin_inf (location_t loc, tree type, int warn) if (!MODE_HAS_INFINITIES (TYPE_MODE (type)) && warn) pedwarn (loc, 0, "target format does not support infinity"); - real_inf (&real); - return build_real (type, real); + return build_real (type, dconstinf); } /* Fold function call to builtin sincos, sincosf, or sincosl. Return @@ -9336,9 +9333,8 @@ fold_builtin_fpclassify (location_t loc, tree *args, int nargs) if (tree_expr_maybe_infinite_p (arg)) { - real_inf (&r); tmp = fold_build2_loc (loc, EQ_EXPR, integer_type_node, arg, - build_real (type, r)); + build_real (type, dconstinf)); res = fold_build3_loc (loc, COND_EXPR, integer_type_node, tmp, fp_infinite, res); } |