about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/s_fmin_template.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/math/s_fmin_template.c b/math/s_fmin_template.c
index 565a836266..5fc47193b7 100644
--- a/math/s_fmin_template.c
+++ b/math/s_fmin_template.c
@@ -17,11 +17,15 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math-use-builtins.h>
 
 
 FLOAT
 M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y)
 {
+#if M_USE_BUILTIN (FMIN)
+  return M_SUF (__builtin_fmin) (x, y);
+#else
   if (islessequal (x, y))
     return x;
   else if (isgreater (x, y))
@@ -30,5 +34,6 @@ M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y)
     return x + y;
   else
     return isnan (y) ? x : y;
+#endif
 }
 declare_mgen_alias (__fmin, fmin);