[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:02:01 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-aarch64-ubuntu-fullbuild-dbg` running on `libc-aarch64-ubuntu` while building `libc,utils` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/71/builds/26673
<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)
...
[ OK ] LlvmLibcStdcHasSingleBitUcTest.OneHot (1 us)
Ran 2 tests. PASS: 2 FAIL: 0
[198/919] Running unit test libc.test.src.math.smoke.iscanonicall_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcIsCanonicalTest.SpecialNumbers
[ OK ] LlvmLibcIsCanonicalTest.SpecialNumbers (6 us)
[ RUN ] LlvmLibcIsCanonicalTest.RoundedNubmers
[ OK ] LlvmLibcIsCanonicalTest.RoundedNubmers (2 us)
Ran 2 tests. PASS: 2 FAIL: 0
[199/919] 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/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc -isystem libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -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 -nostdlibinc -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 -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -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/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp:11:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:24:27: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
static constexpr float128 frexpf128(float128 x, int *exp) {
^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:25:10: note: non-constexpr function 'frexp<long double, 0>' cannot be used in a constant expression
return fputil::frexp(x, *exp);
^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:32:15: note: declared here
LIBC_INLINE T frexp(T x, int &exp) {
^
1 error generated.
[200/919] Running unit test libc.test.src.math.logbf_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN ] LlvmLibcLogbTest.SpecialNumbers
[ OK ] LlvmLibcLogbTest.SpecialNumbers (4 us)
[ RUN ] LlvmLibcLogbTest.PowersOfTwo
[ OK ] LlvmLibcLogbTest.PowersOfTwo (5 us)
[ RUN ] LlvmLibcLogbTest.SomeIntegers
[ OK ] LlvmLibcLogbTest.SomeIntegers (4 us)
[ RUN ] LlvmLibcLogbTest.InRange
[ OK ] LlvmLibcLogbTest.InRange (66 ms)
Ran 4 tests. PASS: 4 FAIL: 0
[201/919] 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/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc -isystem libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -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 -nostdlibinc -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 -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -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/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/math/generic/frexpf128.cpp:11:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:24:27: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
static constexpr float128 frexpf128(float128 x, int *exp) {
^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/math/frexpf128.h:25:10: note: non-constexpr function 'frexp<long double, 0>' cannot be used in a constant expression
return fputil::frexp(x, *exp);
^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:32:15: note: declared here
LIBC_INLINE T frexp(T x, int &exp) {
^
1 error generated.
[202/919] Running unit test libc.test.src.math.smoke.fmodf128_test.__unit__
```
</details>
https://github.com/llvm/llvm-project/pull/147822
More information about the llvm-commits
mailing list