On Tue, 12 Nov 2019, Segher Boessenkool wrote:

> On Tue, Nov 12, 2019 at 08:47:55AM +0100, Richard Biener wrote:
> > OK, but IMHO it is not a good idea to assert UNORDERED_EXPR cannot
> > appear with !HONOR_NANS, is it?
> 
> If we allow that, we should allow UNLT/UNGT/UNLE/UNGE/UNEQ/LTGT as well,
> which doesn't make much sense, especially because LTGT then is the same
> as NE, but NE with HONOR_NANS means something different.
> 
> Without HONOR_NANS all FP comparisons (and FP math in most other aspects)
> behaves like integers do.  Having to support ORDERED and UNORDERED for
> !HONOR_NANS means we need a third codepath in many places.  Without this,
> the !HONOR_NANS code is very close to the integer code, so it's not all
> that bad.
> 
> Assert...  Should we have an assert in some strategic places that makes
> sure we never try to create NaN stuff when NaNs are disabled?

We do have some asserts in buildN but I guess verify_gimple_comparison
might be a good place to catch things early.

Richard.

Reply via email to