This is an archive of the discontinued LLVM Phabricator instance.

[FPEnv] Remove inaccurate comments regarding signaling NaN for isless
ClosedPublic

Authored by eopXD on Sep 21 2022, 7:22 PM.

Details

Summary

By draft of C23 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2912.pdf),
the description for isless macro under 7.12.17.3 says,

The isless macro determines whether its first argument is less than its second
argument. The value of isless(x,y) is always equal to (x)< (y); however, unlike
(x) < (y), isless(x,y) does not raise the invalid floating-point exception when
x and y are unordered and neither is a signaling NaN.

isless should trap when encountering signaling NaN.

Diff Detail

Event Timeline

eopXD created this revision.Sep 21 2022, 7:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2022, 7:22 PM
eopXD requested review of this revision.Sep 21 2022, 7:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2022, 7:22 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jcranmer-intel accepted this revision.Sep 22 2022, 12:13 PM

This looks fine to me, but as clang is not normally my wheelhouse, I'd still prefer to see someone else approve this as well.

This revision is now accepted and ready to land.Sep 22 2022, 12:13 PM
This revision was landed with ongoing or failed builds.Sep 22 2022, 6:13 PM
This revision was automatically updated to reflect the committed changes.