LangRef: Clarify expected sNaN behavior for minnum/maxnum
ClosedPublic

Authored by arsenm on Jul 30 2018, 4:10 AM.

Details

Reviewers
scanon
hfinkel
Summary

This matches the de-facto behavior based on constant folding
and the default lowering to fmin/fmax.

Diff Detail

arsenm created this revision.Jul 30 2018, 4:10 AM
hfinkel added inline comments.
docs/LangRef.rst
11486

I don't understand this text because it seems like if the standard says that a QNaN is returned if either input is a SNaN, then why would the lowering need to additionally canonicalize the inputs? It seems like that would not change the result.

arsenm added inline comments.Jul 31 2018, 12:58 AM
docs/LangRef.rst
11486

The standard says minnum(x, snan) -> qnan. This differs from the behavior from fmin, where fmin(x, snan) -> x. You need to quiet to get the other operand instead of qnan

arsenm updated this revision to Diff 158183.Jul 31 2018, 1:04 AM

Try to be clearer.

One thing I am still unclear ones is if the standard requires payload bits to be zero or preserved

hfinkel accepted this revision.Aug 27 2018, 9:58 AM

ping

LGTM

This revision is now accepted and ready to land.Aug 27 2018, 9:58 AM
arsenm closed this revision.Aug 27 2018, 10:41 AM

r340762