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; 4+ 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] 4+ 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; 4+ 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] 4+ 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; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread

end of thread, other threads:[~2005-02-26  9:50 UTC | newest]

Thread overview: 4+ 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

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).