This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17686] New: sincos can be folded at the tree level
- From: "bonzini at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Sep 2004 09:12:40 -0000
- Subject: [Bug tree-optimization/17686] New: sincos can be folded at the tree level
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If a sincos instruction is defined, it is profitable to introduce these foldings:
sincos (x, &s, &c);
sincos (-x, &s, &c);
to
(*c = cos (x), *s = sin (x))
(*c = cos (x), *s = -sin (x))
respectively. This allows the sincos instruction to be used; the second folding
is necessary to avoid that the cos (x) = cos (-x) optimization kicks in, leaving
us with an unoptimizable
(*c = cos (x), *s = sin (-x))
This patch is proposed for 4.1 through the 17652 metabug.
--
Summary: sincos can be folded at the tree level
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: bonzini at gcc dot gnu dot org
ReportedBy: bonzini at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,uros at kss-loka dot si
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17686