[Bug middle-end/19953] Special-case real + complex arithmetic operation (-ffast-math)
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Mar 1 21:14:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-01 21:14 -------
(In reply to comment #17)
> Andrew,
>
> I'm sorry if I'm not making myself clear here.
>
> The problem that I see is that, on ia64-unknown-linux-gnu and on
> i386-pc-linux-gnu, with clean trees, I see code like
>
> <L2>:;
> D.2390 = 0.0 / SR.22;
> D.2392 = SR.22 + D.2390 * 0.0;
> c$real = (D.2371 + D.2372 * D.2390) / D.2392;
> c$imag = (D.2372 - D.2371 * D.2390) / D.2392;
>
> in *.t65.optimized for the simple test case with -O1 and -O3. As you
> have stated, this is independent of PR 20139.
Yes that code is correct. as 0.0/SR.22 is not 0.0 if SR.22 is NAN.
and 0.0 * D.2390 is not 0.0 if D.2390 is NAN.
Try -ffast-math or -fno-trapping-math or -ffinite-math-only.
> I just rechecked this with the 4.0.0 20050226 (prerelease) snapshot.
> You have posted different results, which I cannot reproduce.
Yes I posted results with -ffast-math and other options as you described in comment #8:
> $ gcc -ffast-math -O3 -fdump-tree-optimized -fno-cx-limited-range -S c-div.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953
More information about the Gcc-bugs
mailing list