aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2007-06-12 09:19:36 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-06-12 09:19:36 +0200
commit9883e373fc9bbdf33e1913f184f3768835b88f88 (patch)
treed7c8c6158be8c32577d9db56a22df3abbd3fc85f /gcc/fold-const.c
parentf84c7ed94694125c633be09bedb477cfac3a7f46 (diff)
downloadgcc-9883e373fc9bbdf33e1913f184f3768835b88f88.zip
gcc-9883e373fc9bbdf33e1913f184f3768835b88f88.tar.gz
gcc-9883e373fc9bbdf33e1913f184f3768835b88f88.tar.bz2
fold-const (fold_binary): Also optimize a/cbrt(b/c) into a*cbrt(c/b) if flag_unsafe_math_optimizations is set.
* fold-const (fold_binary) [RDIV_EXPR]: Also optimize a/cbrt(b/c) into a*cbrt(c/b) if flag_unsafe_math_optimizations is set. testuite/ChangeLog: * gcc.dg/builtins-11.c: Also check folding of a/cbrt(b/c). From-SVN: r125641
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index d2dd8cb..06b7c74 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -10555,8 +10555,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
}
}
- /* Optimize a/sqrt(b/c) into a*sqrt(c/b). */
- if (BUILTIN_SQRT_P (fcode1))
+ /* Optimize a/root(b/c) into a*root(c/b). */
+ if (BUILTIN_ROOT_P (fcode1))
{
tree rootarg = CALL_EXPR_ARG (arg1, 0);