On powerpc64le tanf tests show:
UBSAN: Undefined behaviour in ../sysdeps/ieee754/flt-32/math_config.h:105:11 passing zero to __builtin_ctz()
#include <math_private.h>
#include <nan-high-order-bit.h>
#include <stdint.h>
+#include <stdbit.h>
#ifndef WANT_ROUNDING
/* Correct special case results in non-nearest rounding modes. */
{
union { float f; uint32_t i; } u = {y};
union { float f; uint32_t i; } v = {y - copysignf (1.0, x)};
- if (__builtin_ctzl (v.i) > __builtin_ctzl (u.i))
+ if (stdc_leading_zeros (v.i) > stdc_leading_zeros (u.i))
y = v.f;
}
return y;