[Bug middle-end/20434] pessimization of complex expression
Thomas dot Koenig at online dot de
gcc-bugzilla@gcc.gnu.org
Sat Mar 12 23:13:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list