summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-18 01:15:28 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-18 01:15:28 +0000
commit6ff9eeff9a050ff44c587061107a90f9b04f680f (patch)
treeddd282748d3d85c9d507e031c8331541a5e8978d /gcc/builtins.c
parent65dd13789853029681f11c4dd176aa417d730c9e (diff)
downloadgcc-6ff9eeff9a050ff44c587061107a90f9b04f680f.tar.gz
PR middle-end/30251
* builtins.c (fold_builtin_1): Handle y0, y1. (fold_builtin_2): Handle yn. testsuite: * gcc.dg/torture/builtin-math-2.c: Test y0, y1, yn. * gcc.dg/torture/builtin-math-4.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124819 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 221b5a34b3e..da6bbc6e510 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -9783,6 +9783,18 @@ fold_builtin_1 (tree fndecl, tree arg0, bool ignore)
return do_mpfr_arg1 (arg0, type, mpfr_j1,
NULL, NULL, 0);
break;
+
+ CASE_FLT_FN (BUILT_IN_Y0):
+ if (validate_arg (arg0, REAL_TYPE))
+ return do_mpfr_arg1 (arg0, type, mpfr_y0,
+ &dconst0, NULL, false);
+ break;
+
+ CASE_FLT_FN (BUILT_IN_Y1):
+ if (validate_arg (arg0, REAL_TYPE))
+ return do_mpfr_arg1 (arg0, type, mpfr_y1,
+ &dconst0, NULL, false);
+ break;
#endif
CASE_FLT_FN (BUILT_IN_NAN):
@@ -9901,6 +9913,13 @@ fold_builtin_2 (tree fndecl, tree arg0, tree arg1, bool ignore)
&& validate_arg (arg1, REAL_TYPE))
return do_mpfr_bessel_n (arg0, arg1, type, mpfr_jn, NULL, 0);
break;
+
+ CASE_FLT_FN (BUILT_IN_YN):
+ if (validate_arg (arg0, INTEGER_TYPE)
+ && validate_arg (arg1, REAL_TYPE))
+ return do_mpfr_bessel_n (arg0, arg1, type, mpfr_yn,
+ &dconst0, false);
+ break;
#endif
CASE_FLT_FN (BUILT_IN_ATAN2):