https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127791

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #3)
> > In that context, -fdelete-dead-exceptions implies eliding such
> > statements.  Does it also imply that we can turn
> > 
> >  _1 = x_2 - 0.;
> >  foo (_1);
> > 
> > into
> > 
> >  _1 = x_2 - 0.;
> >  foo (x_2);
> > 
> > and that into
> > 
> >  foo (x_2);
> > 
> > eliding the dead stmt _1 = x_2 - 0.?  Which is an indirect way
> > to allow x - 0. -> x, losing an IEEE exception for NaN - 0.?
> 
> There should be no NaNs in the first place when Machine_Overflows_On_Target
> is True, so I don't think that we need to block anything because of them in
> this setting.

OK, I guess with Invalid, Overflow and Divide-by-zero there isn't any
transform I can think of that would elide any of those without also
changing the value (all of those operations will create a NaN or an Inf
and creating those will raise those exceptions).

With FP ranges we might now prove those to not occur but generally
Inexact could still be raised, so can Underflow.  Transforms changing
those are generally guarded with -funsafe-math-optimizations though.

Reply via email to