about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r--sysdeps/ieee754/flt-32/s_roundf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/s_roundf.c b/sysdeps/ieee754/flt-32/s_roundf.c
index cddab7b505..5d91239d6e 100644
--- a/sysdeps/ieee754/flt-32/s_roundf.c
+++ b/sysdeps/ieee754/flt-32/s_roundf.c
@@ -22,11 +22,16 @@
 
 #include <math_private.h>
 #include <libm-alias-float.h>
+#include <math-use-builtins.h>
 
 
 float
 __roundf (float x)
 {
+#if USE_ROUNDF_BUILTIN
+  return __builtin_roundf (x);
+#else
+  /* Use generic implementation.  */
   int32_t i0, j0;
 
   GET_FLOAT_WORD (i0, x);
@@ -61,5 +66,6 @@ __roundf (float x)
 
   SET_FLOAT_WORD (x, i0);
   return x;
+#endif /* ! USE_ROUNDF_BUILTIN  */
 }
 libm_alias_float (__round, round)