aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2006-11-12 23:51:36 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2006-11-12 23:51:36 +0000
commit5c5b21550c5b1b9631b0d14569cc47f6d16dfc7b (patch)
tree9a539cef8be2437dc8b524015aa3a340c925fa7d /gcc/fold-const.c
parent8f8bb1d2008496ba3856bc12f8b2cae12195c235 (diff)
downloadgcc-5c5b21550c5b1b9631b0d14569cc47f6d16dfc7b.zip
gcc-5c5b21550c5b1b9631b0d14569cc47f6d16dfc7b.tar.gz
gcc-5c5b21550c5b1b9631b0d14569cc47f6d16dfc7b.tar.bz2
builtins.c (fold_builtin_cosh): New.
* builtins.c (fold_builtin_cosh): New. (fold_builtin_1): Use it. * fold-const.c (negate_mathfn_p): Add llround, lround, round, trunc to the list of "odd" functions. Also add llrint, lrint, rint and nearbyint when flag_rounding_math is false. testsuite: * gcc.dg/torture/builtin-symmetric-1.c: Add more cases. From-SVN: r118733
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index cf1df69..eeec0c1 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -890,13 +890,23 @@ negate_mathfn_p (enum built_in_function code)
CASE_FLT_FN (BUILT_IN_ATAN):
CASE_FLT_FN (BUILT_IN_ATANH):
CASE_FLT_FN (BUILT_IN_CBRT):
+ CASE_FLT_FN (BUILT_IN_ERF):
+ CASE_FLT_FN (BUILT_IN_LLROUND):
+ CASE_FLT_FN (BUILT_IN_LROUND):
+ CASE_FLT_FN (BUILT_IN_ROUND):
CASE_FLT_FN (BUILT_IN_SIN):
CASE_FLT_FN (BUILT_IN_SINH):
CASE_FLT_FN (BUILT_IN_TAN):
CASE_FLT_FN (BUILT_IN_TANH):
- CASE_FLT_FN (BUILT_IN_ERF):
+ CASE_FLT_FN (BUILT_IN_TRUNC):
return true;
+ CASE_FLT_FN (BUILT_IN_LLRINT):
+ CASE_FLT_FN (BUILT_IN_LRINT):
+ CASE_FLT_FN (BUILT_IN_NEARBYINT):
+ CASE_FLT_FN (BUILT_IN_RINT):
+ return !flag_rounding_math;
+
default:
break;
}