On Wed, 20 Nov 2019, Jakub Jelinek wrote:

> On Wed, Nov 20, 2019 at 10:17:38AM -0600, Segher Boessenkool wrote:
> > On Wed, Nov 20, 2019 at 03:46:29PM +0000, Richard Sandiford wrote:
> > > Segher Boessenkool <seg...@kernel.crashing.org> writes:
> > > > UNLT & ORDERED is always LT.  When would it not be true?
> > > 
> > > LT traps on quiet NaNs for -ftrapping-math, UNLT and ORDERED don't.
> > 
> > No?  -ftrapping-math makes nothing trap.  The only thing it does is to
> > not do optimisations that are not valid if traps are considered to be
> > a user-visible thing.
> > 
> > Almost nothing ever traps on quiet NaNs.
> 
> A lot traps even with quiet NaNs, assuming exceptions are enabled.
> E.g. for x86 https://www.felixcloutier.com/x86/cmppd#tbl-3-1 lists the
> details which operations rise FE_INVALID and which don't if it is enabled.

The general IEEE rule is *operations with a non-floating-point result*.  
So comparisons (other than quiet ones) and conversions to integer types.  
(And the special case that it's unspecified whether fma (0, Inf, qNaN) 
traps or not.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to