https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> ---
I currently have

===
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ad5135c..bc3d318 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -9050,6 +9050,12 @@ fold_builtin_interclass_mathfn (location_t loc, tree
fnde
   if (interclass_mathfn_icode (arg, fndecl) != CODE_FOR_nothing)
     return NULL_TREE;

+  /* None of these builtins are ever exceptional, not even for signaling NaNs,
+     so we cannot do any of these optimizations that involve a floating point
+     comparison.  */
+  if (flag_signaling_nans)
+    return NULL_TREE;
+
   mode = TYPE_MODE (TREE_TYPE (arg));

   bool is_ibm_extended = MODE_COMPOSITE_P (mode);
===

but we should really handle this with some non-signaling insns, not punt
it to libm to do.

Reply via email to