aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-02-09 21:56:35 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-02-09 21:56:35 +0000
commite3bb43c0fef35c410538453c6a70a22822e03b10 (patch)
treeb165cf0028ec1a832fc59f34df44d639c9c318a2 /gcc/tree.h
parent08c2481a791a11ac8aee6652c6fb8c57faf4d584 (diff)
downloadgcc-e3bb43c0fef35c410538453c6a70a22822e03b10.zip
gcc-e3bb43c0fef35c410538453c6a70a22822e03b10.tar.gz
gcc-e3bb43c0fef35c410538453c6a70a22822e03b10.tar.bz2
fold-const.c (fold_strip_sign_ops): New function to simplify a floating point expression ignoring the sign of the...
* fold-const.c (fold_strip_sign_ops): New function to simplify a floating point expression ignoring the sign of the result. (fold) <ABS_EXPR>: Use it to simplify fabs(x). (fold) <MULT_EXPR>: Use it to simplify x*x. * tree.h (fold_strip_sign_ops): Prototype here. * builtins.c (fold_builtin_copysign): Take an additional FNDECL argument. Use fold_strip_sign_ops to simplify the first argument. (fold_builtin_pow): Use fold_strip_sign_ops to simplify the first argument when the second argument is an even integer constant, but only with -funsafe_math_optimizations. (fold_builtin_1): Update call to fold_builtin_copysign. * gcc.dg/builtins-48.c: New test case. * gcc.dg/builtins-49.c: New test case. * gcc.dg/builtins-50.c: New test case. * gcc.dg/builtins-51.c: New test case. From-SVN: r94779
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 47f65c8..e64fb99 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3527,7 +3527,8 @@ extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree);
extern tree fold_read_from_constant_string (tree);
extern tree int_const_binop (enum tree_code, tree, tree, int);
extern tree build_fold_addr_expr (tree);
-tree fold_build_cleanup_point_expr (tree type, tree expr);
+extern tree fold_build_cleanup_point_expr (tree type, tree expr);
+extern tree fold_strip_sign_ops (tree);
extern tree build_fold_addr_expr_with_type (tree, tree);
extern tree build_fold_indirect_ref (tree);
extern tree constant_boolean_node (int, tree);