diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-04-08 23:24:38 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-04-08 23:24:38 +0000 |
commit | 531878a68e636392d594f22d0fc6e1444e82d940 (patch) | |
tree | 57e664d9c1807ff9f4b3bd4f3e4ddbb0c32619d0 /gcc/fold-const.c | |
parent | c583e7c354b04607db93798fc92e040f11a60a54 (diff) | |
download | gcc-531878a68e636392d594f22d0fc6e1444e82d940.zip gcc-531878a68e636392d594f22d0fc6e1444e82d940.tar.gz gcc-531878a68e636392d594f22d0fc6e1444e82d940.tar.bz2 |
builtins.c (fold_builtin): Constant fold expressions as x*0.5 instead of x/2.0.
* builtins.c (fold_builtin): Constant fold expressions as x*0.5
instead of x/2.0. Optimize sqrt(pow(x,y)) as pow(x,y*0.5),
log(pow(x,y)) as y*log(x), pow(exp(x),y) as exp(x*y),
pow(sqrt(x),y) as pow(x,y*0.5) and pow(pow(x,y),z) as pow(x,y*z).
Delete function scope "fcode" variable to avoid shadowing.
* gcc.dg/builtins-9.c: New test case.
* gcc.dg/builtins-10.c: New test case.
From-SVN: r65386
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions