From 10409bf86e58320443db5c5ea2adf5e437104ee9 Mon Sep 17 00:00:00 2001 From: eopXD Date: Wed, 21 Sep 2022 19:21:55 -0700 Subject: [PATCH] [FPEnv] Remove inaccurate comments regarding signaling NaN for isless 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. Reviewed By: jcranmer-intel, efriedma Differential Revision: https://reviews.llvm.org/D134407 --- clang/lib/CodeGen/CGBuiltin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index a43c50a..2d8b017 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -2976,7 +2976,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // Ordered comparisons: we know the arguments to these are matching scalar // floating point values. CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E); - // FIXME: for strictfp/IEEE-754 we need to not trap on SNaN here. Value *LHS = EmitScalarExpr(E->getArg(0)); Value *RHS = EmitScalarExpr(E->getArg(1)); -- 2.7.4