[libc] [llvm] [libc][math] Refactor frexpf128 implementation to header-only in src/… (PR #147822)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 20:01:57 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-gcc-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc,utils` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/25997

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[ RUN      ] LlvmLibcCospifTest.SpecialNumbers
[       OK ] LlvmLibcCospifTest.SpecialNumbers (12 us)
[ RUN      ] LlvmLibcCospifTest.FTZMode
[       OK ] LlvmLibcCospifTest.FTZMode (3 us)
[ RUN      ] LlvmLibcCospifTest.DAZMode
[       OK ] LlvmLibcCospifTest.DAZMode (3 us)
[ RUN      ] LlvmLibcCospifTest.FTZDAZMode
[       OK ] LlvmLibcCospifTest.FTZDAZMode (2 us)
Ran 4 tests.  PASS: 4  FAIL: 0
[153/1206] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__internal__.dir/frexpf128.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__internal__.dir/frexpf128.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__internal__.dir/frexpf128.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__internal__.dir/frexpf128.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__internal__.dir/frexpf128.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp:11:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h: In function ‘constexpr float128 __llvm_libc_20_0_0_git::math::frexpf128(float128, int*)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:25:23: error: call to non-‘constexpr’ function ‘T __llvm_libc_20_0_0_git::fputil::frexp(T, int&) [with T = __float128; typename __llvm_libc_20_0_0_git::cpp::enable_if<is_floating_point_v<T>, int>::type <anonymous> = 0]’
   25 |   return fputil::frexp(x, *exp);
      |          ~~~~~~~~~~~~~^~~~~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:16:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:32:15: note: ‘T __llvm_libc_20_0_0_git::fputil::frexp(T, int&) [with T = __float128; typename __llvm_libc_20_0_0_git::cpp::enable_if<is_floating_point_v<T>, int>::type <anonymous> = 0]’ declared here
   32 | LIBC_INLINE T frexp(T x, int &exp) {
      |               ^~~~~
[154/1206] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.dir/frexpf128.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.dir/frexpf128.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.dir/frexpf128.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.dir/frexpf128.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.dir/frexpf128.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp:11:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h: In function ‘constexpr float128 __llvm_libc_20_0_0_git::math::frexpf128(float128, int*)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:25:23: error: call to non-‘constexpr’ function ‘T __llvm_libc_20_0_0_git::fputil::frexp(T, int&) [with T = __float128; typename __llvm_libc_20_0_0_git::cpp::enable_if<is_floating_point_v<T>, int>::type <anonymous> = 0]’
   25 |   return fputil::frexp(x, *exp);
      |          ~~~~~~~~~~~~~^~~~~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:16:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:32:15: note: ‘T __llvm_libc_20_0_0_git::fputil::frexp(T, int&) [with T = __float128; typename __llvm_libc_20_0_0_git::cpp::enable_if<is_floating_point_v<T>, int>::type <anonymous> = 0]’ declared here
   32 | LIBC_INLINE T frexp(T x, int &exp) {
      |               ^~~~~
[155/1206] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.__internal__.dir/frexpf128.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.__internal__.dir/frexpf128.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.__internal__.dir/frexpf128.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.__internal__.dir/frexpf128.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.__internal__.dir/frexpf128.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp:11:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h: In function ‘constexpr float128 __llvm_libc_20_0_0_git::math::frexpf128(float128, int*)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:25:23: error: call to non-‘constexpr’ function ‘T __llvm_libc_20_0_0_git::fputil::frexp(T, int&) [with T = __float128; typename __llvm_libc_20_0_0_git::cpp::enable_if<is_floating_point_v<T>, int>::type <anonymous> = 0]’
   25 |   return fputil::frexp(x, *exp);
      |          ~~~~~~~~~~~~~^~~~~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:16:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:32:15: note: ‘T __llvm_libc_20_0_0_git::fputil::frexp(T, int&) [with T = __float128; typename __llvm_libc_20_0_0_git::cpp::enable_if<is_floating_point_v<T>, int>::type <anonymous> = 0]’ declared here
   32 | LIBC_INLINE T frexp(T x, int &exp) {
      |               ^~~~~
[156/1206] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.dir/frexpf128.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.dir/frexpf128.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.dir/frexpf128.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.dir/frexpf128.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.frexpf128.__NO_FMA_OPT.dir/frexpf128.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp:11:

```

</details>

https://github.com/llvm/llvm-project/pull/147822


More information about the llvm-commits mailing list