This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20434] pessimization of complex expression
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2005 23:13:50 -0000
- Subject: [Bug middle-end/20434] pessimization of complex expression
- References: <20050311215610.20434.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Thomas dot Koenig at online dot de 2005-03-12 23:13 -------
(In reply to comment #6)
> Well the real reason is creal/cimag returns double and not float.
> Use crealf/cimagf instead.
You're right, of course. Doing that gets me
<bb 0>:
foo (&cr, &ci);
return cr + 0.0 + ci + 0.0 < 0.0;
OK, the direct cast has gone away. I wonder if this still converts
to double, though...
> Well yes this is a missed optimization, which should be filed separately.
I think using crealf/cimagf pretty much solves this. If you lie to the
compiler... :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20434