summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-25 14:50:20 +0000
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-25 14:50:20 +0000
commit352e5c7a510ee2d0307da46098001937a8aba884 (patch)
tree8a5cb59dc6b029ac45e8a1df28660435efa467b8 /gcc/fold-const.c
parent3a935f94dd98f8afc82041a2e2b7f2827de23413 (diff)
downloadgcc-352e5c7a510ee2d0307da46098001937a8aba884.tar.gz
* fold-const.c (negate_mathfn_p): Fix comment and add support
for BUILT_IN_CBRT, BUILT_IN_SINH, BUILT_IN_TANH, BUILT_IN_ASINH, BUILT_IN_ATANH. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107507 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 9a6ac70a39c..59037d59758 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -857,8 +857,8 @@ div_if_zero_remainder (enum tree_code code, tree arg1, tree arg2)
return build_int_cst_wide (type, quol, quoh);
}
-/* Return true if built-in mathematical function specified by CODE
- preserves the sign of it argument, i.e. -f(x) == f(-x). */
+/* Return true if the built-in mathematical function specified by CODE
+ is odd, i.e. -f(x) == f(-x). */
static bool
negate_mathfn_p (enum built_in_function code)
@@ -868,15 +868,30 @@ negate_mathfn_p (enum built_in_function code)
case BUILT_IN_ASIN:
case BUILT_IN_ASINF:
case BUILT_IN_ASINL:
+ case BUILT_IN_ASINH:
+ case BUILT_IN_ASINHF:
+ case BUILT_IN_ASINHL:
case BUILT_IN_ATAN:
case BUILT_IN_ATANF:
case BUILT_IN_ATANL:
+ case BUILT_IN_ATANH:
+ case BUILT_IN_ATANHF:
+ case BUILT_IN_ATANHL:
+ case BUILT_IN_CBRT:
+ case BUILT_IN_CBRTF:
+ case BUILT_IN_CBRTL:
case BUILT_IN_SIN:
case BUILT_IN_SINF:
case BUILT_IN_SINL:
+ case BUILT_IN_SINH:
+ case BUILT_IN_SINHF:
+ case BUILT_IN_SINHL:
case BUILT_IN_TAN:
case BUILT_IN_TANF:
case BUILT_IN_TANL:
+ case BUILT_IN_TANH:
+ case BUILT_IN_TANHF:
+ case BUILT_IN_TANHL:
return true;
default: