------- Additional Comments From Thomas dot Koenig at online dot de  2005-03-01 
21:26 -------
(In reply to comment #18)

> > <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.

Ok, then I have misunderstood you - you were referring to the
results with -ffast-math.

However, there still is a missed optimization here.

If SR.22 is NaN, then the proposed simplification

c$real = D.2371 / SR.22;
c$imag = D.2372 / SR.22

would still yield NaN for c$real and c$imag, which is correct.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953

Reply via email to