[Bug tree-optimization/20219] Missed optimisation sin / tan --> cos
--- Comment #4 from uros at gcc dot gnu dot org 2005-11-28 07:29 --- Subject: Bug 20219 Author: uros Date: Mon Nov 28 07:29:43 2005 New Revision: 107597 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107597 Log: PR middle-end/20219 * fold-const.c (fold binary) : Optimize sin(x)/tan(x) as cos(x) and tan(x)/sin(x) as 1.0/cos(x) when flag_unsafe_math_optimizations is set and we don't care about NaNs or Infinities. Move x/expN(y) and x/pow(y,z) transformation into common flag_unsafe_math_optimizations section. testsuite/ * gcc.dg/builtins-20.c: Add checks for sin(x)/tan(x) and tan(x)/sin(x) transformations. Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/builtins-20.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219
[Bug tree-optimization/20219] Missed optimisation sin / tan --> cos
--- Comment #3 from uros at kss-loka dot si 2005-11-28 07:20 --- Reopened to ... -- uros at kss-loka dot si changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WONTFIX | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219
[Bug tree-optimization/20219] Missed optimisation sin / tan --> cos
--- Additional Comments From uros at kss-loka dot si 2005-02-26 09:50 --- Here is the patch to implement missing folds: http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01024.html And here is the explanation why this transformation is not suitable for GCC even with -ffast-math: http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01034.html -- What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219
[Bug tree-optimization/20219] Missed optimisation sin / tan --> cos
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-26 01:13 --- Confirmed, nice catch. -- What|Removed |Added Status|UNCONFIRMED |NEW Component|rtl-optimization|tree-optimization Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2005-02-26 01:13:02 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219