[Bug tree-optimization/56125] [4.7 Regression] -O2 -ffast-math generates bad code when dividing a double by the square of another double.
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 1 14:18:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56125
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 14:17:58 UTC ---
Author: jakub
Date: Fri Feb 1 14:17:50 2013
New Revision: 195664
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195664
Log:
Backported from mainline
2013-01-28 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56125
* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Don't optimize
pow(x,c) into sqrt(x) * powi(x, n/2) or
1.0 / (sqrt(x) * powi(x, abs(n/2))) if c is an integer or when
optimizing for size.
Don't optimize pow(x,c) into powi(x, n/3) * powi(cbrt(x), n%3) or
1.0 / (powi(x, abs(n)/3) * powi(cbrt(x), abs(n)%3)) if 2c is an
integer.
* gcc.dg/pr56125.c: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/pr56125.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-ssa-math-opts.c
More information about the Gcc-bugs
mailing list