On Thu, 3 May 2018, Jakub Jelinek wrote:

> On Thu, May 03, 2018 at 06:35:50PM +0200, Jakub Jelinek wrote:
> > That requires a machine_mode or tree, but I don't have either of those,
> > nor the caller (fold_const_call_sss) has those.
> > 
> > I could change it to:
> >   if (flag_signalling_nans
> >       && !flag_finite_math_only
> >       && format->has_nans
> > so that it would better duplicate what HONOR_SNANS actually tests.
> > Though, I think it is ok to punt if one of the operands is a signalling nan
> > even if flag_signalling_nans.
> 
> Though in theory the arg0's mode for which we have format pointer could
> not have nans, but arg1's mode (for which we only have the REAL_VALUE_TYPE)
> could have nans (or vice versa).

Hmm, indeed.  OTOH what's wrong with just removing the 
flag_singalling_nans check, just keeping the actual checks for
REAL_VALUE_ISSIGNALING_NAN?

Thus the patch is ok with just those checks.  The requested assert
shouldn't be neccessary indeed.

Thanks,
Richard.

Reply via email to