https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121652
Andrew Waterman <andrew at sifive dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew at sifive dot com --- Comment #5 from Andrew Waterman <andrew at sifive dot com> --- My recollection is that Annex F leaves signaling NaN behavior implementation-defined, and so setting the invalid flag on signaling NaN is permitted but not required. For __builtin_isnan, I see that the ARMv8 and x86 backends use instructions that set the invalid flag on signaling NaNs, so it's probably best that we do the same. Furthermore, it's more efficient to use feq than fclass, because when the result controls an if-statement, the xori can be omitted (whereas fclass still needs an andi or a constant load).