public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug rtl-optimization/20219] New: Missed optimisation sin / tan --> cos @ 2005-02-26 22:27 christophe dot jaillet at wanadoo dot fr 2005-02-26 23:23 ` [Bug rtl-optimization/20219] " pinskia at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: christophe dot jaillet at wanadoo dot fr @ 2005-02-26 22:27 UTC (permalink / raw) To: gcc-bugs GCC knows how to optimise tan * cos --> sin (fold-const line 7734) cos * tan --> sin sin / cos --> tan (fold-const line 8080) cos / sin --> 1.0 / tan (fold-const line 8094) but misses sin / tan --> cos tan / sin --> 1.0 / cos -- Summary: Missed optimisation sin / tan --> cos Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: christophe dot jaillet at wanadoo dot fr CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/20219] Missed optimisation sin / tan --> cos 2005-02-26 22:27 [Bug rtl-optimization/20219] New: Missed optimisation sin / tan --> cos christophe dot jaillet at wanadoo dot fr @ 2005-02-26 23:23 ` pinskia at gcc dot gnu dot org 2005-02-27 0:51 ` [Bug tree-optimization/20219] " pinskia at gcc dot gnu dot org 2005-02-27 4:09 ` uros at kss-loka dot si 2 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-02-26 23:23 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |19987 nThis| | Severity|normal |enhancement Keywords| |missed-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/20219] Missed optimisation sin / tan --> cos 2005-02-26 22:27 [Bug rtl-optimization/20219] New: Missed optimisation sin / tan --> cos christophe dot jaillet at wanadoo dot fr 2005-02-26 23:23 ` [Bug rtl-optimization/20219] " pinskia at gcc dot gnu dot org @ 2005-02-27 0:51 ` pinskia at gcc dot gnu dot org 2005-02-27 4:09 ` uros at kss-loka dot si 2 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-02-27 0:51 UTC (permalink / raw) To: gcc-bugs ------- 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|0000-00-00 00:00:00 |2005-02-26 01:13:02 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20219 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/20219] Missed optimisation sin / tan --> cos 2005-02-26 22:27 [Bug rtl-optimization/20219] New: Missed optimisation sin / tan --> cos christophe dot jaillet at wanadoo dot fr 2005-02-26 23:23 ` [Bug rtl-optimization/20219] " pinskia at gcc dot gnu dot org 2005-02-27 0:51 ` [Bug tree-optimization/20219] " pinskia at gcc dot gnu dot org @ 2005-02-27 4:09 ` uros at kss-loka dot si 2 siblings, 0 replies; 6+ messages in thread From: uros at kss-loka dot si @ 2005-02-27 4:09 UTC (permalink / raw) To: gcc-bugs ------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <bug-20219-7534@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/20219] Missed optimisation sin / tan --> cos [not found] <bug-20219-7534@http.gcc.gnu.org/bugzilla/> @ 2005-11-28 7:20 ` uros at kss-loka dot si 2005-11-28 7:29 ` uros at gcc dot gnu dot org 1 sibling, 0 replies; 6+ messages in thread From: uros at kss-loka dot si @ 2005-11-28 7:20 UTC (permalink / raw) To: gcc-bugs ------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/20219] Missed optimisation sin / tan --> cos [not found] <bug-20219-7534@http.gcc.gnu.org/bugzilla/> 2005-11-28 7:20 ` uros at kss-loka dot si @ 2005-11-28 7:29 ` uros at gcc dot gnu dot org 1 sibling, 0 replies; 6+ messages in thread From: uros at gcc dot gnu dot org @ 2005-11-28 7:29 UTC (permalink / raw) To: gcc-bugs ------- 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) <RDIV_EXPR>: 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-11-28 7:29 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-02-26 22:27 [Bug rtl-optimization/20219] New: Missed optimisation sin / tan --> cos christophe dot jaillet at wanadoo dot fr 2005-02-26 23:23 ` [Bug rtl-optimization/20219] " pinskia at gcc dot gnu dot org 2005-02-27 0:51 ` [Bug tree-optimization/20219] " pinskia at gcc dot gnu dot org 2005-02-27 4:09 ` uros at kss-loka dot si [not found] <bug-20219-7534@http.gcc.gnu.org/bugzilla/> 2005-11-28 7:20 ` uros at kss-loka dot si 2005-11-28 7:29 ` uros at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).