This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/5739] "const" and "pure" function attributes pessimize code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Aug 2004 00:38:27 -0000
- Subject: [Bug rtl-optimization/5739] "const" and "pure" function attributes pessimize code
- References: <20020220141600.5739.dann@godzilla.ics.uci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-26 00:38 -------
I understand what is going on now:
double ur = p->re;
double ui = p->im;
double u2 = ur * ur + ui * ui;
double cosv = mycos (u2);
double sinv = mysin (u2);
p->re = p->re * cosv - p->im * sinv; <--- here we actually do not load again from p->re but
rather use ur which makes we store on the stack (or keep in register for targets with more than a few FP
registers like PPC, in which case this works correctly :) ).
So this is really only happens on x86
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-05-27 23:04:12 |2004-08-26 00:38:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5739