about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/s_roundevenf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/s_roundevenf.c')
-rw-r--r--sysdeps/ieee754/flt-32/s_roundevenf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/s_roundevenf.c b/sysdeps/ieee754/flt-32/s_roundevenf.c
index 2cc0d7b001..4f568579d8 100644
--- a/sysdeps/ieee754/flt-32/s_roundevenf.c
+++ b/sysdeps/ieee754/flt-32/s_roundevenf.c
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-float.h>
+#include <math-use-builtins.h>
 #include <stdint.h>
 
 #define BIAS 0x7f
@@ -30,6 +31,9 @@
 float
 __roundevenf (float x)
 {
+#if USE_ROUNDEVENF_BUILTIN
+  return __builtin_roundevenf (x);
+#else
   uint32_t ix, ux;
   GET_FLOAT_WORD (ix, x);
   ux = ix & 0x7fffffff;
@@ -67,6 +71,7 @@ __roundevenf (float x)
     ix &= 0x80000000;
   SET_FLOAT_WORD (x, ix);
   return x;
+#endif /* ! USE_ROUNDEVENF_BUILTIN  */
 }
 #ifndef __roundevenf
 libm_alias_float (__roundeven, roundeven)