[libc-commits] [libc] [llvm] [libc][math] Refactor canonicalize family to header-only (PR #181467)
via libc-commits
libc-commits at lists.llvm.org
Sat Feb 14 20:32:05 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__internal__.dir/canonicalizebf16.cpp.o</summary>
```
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__internal__.dir/canonicalizebf16.cpp.o
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_23_0_0_git -I/home/gha/actions-runner/_work/llvm-project/llvm-project/libc -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffixed-point -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 -fstack-protector-strong -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 -UNDEBUG -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__internal__.dir/canonicalizebf16.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__internal__.dir/canonicalizebf16.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__internal__.dir/canonicalizebf16.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:259:16: error: argument type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
259 | FPBits<T> sx(x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: error: incomplete result type '__llvm_libc_23_0_0_git::fputil::BFloat16' in function definition
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: note: in instantiation of member function '__llvm_libc_23_0_0_git::fputil::FPBits<__llvm_libc_23_0_0_git::fputil::BFloat16>::get_val' requested here
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:52: error: no matching function for call to 'bit_cast'
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/CPP/bit.h:48:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
43 | (sizeof(To) == sizeof(From)) &&
| ~~~~~~
44 | cpp::is_trivially_constructible<To>::value &&
45 | cpp::is_trivially_copyable<To>::value &&
46 | cpp::is_trivially_copyable<From>::value,
47 | To>
48 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1190:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1187 | (sizeof(To) == sizeof(From)) && cpp::is_trivially_copyable<To>::value &&
| ~~~~~~
1188 | cpp::is_trivially_copyable<From>::value && is_big_int<To>::value,
1189 | To>
1190 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1205:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1200 | sizeof(To) == sizeof(UInt<Bits>) &&
| ~~~~~~
1201 | cpp::is_trivially_constructible<To>::value &&
1202 | cpp::is_trivially_copyable<To>::value &&
1203 | cpp::is_trivially_copyable<UInt<Bits>>::value,
1204 | To>
1205 | bit_cast(const UInt<Bits> &from) {
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: error: calling 'get_val' with incomplete return type '__llvm_libc_23_0_0_git::fputil::BFloat16'
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: note: 'get_val' declared here
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: error: no viable overloaded '='
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: note: type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
```
</details>
<details>
<summary>libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.dir/canonicalizebf16.cpp.o</summary>
```
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.dir/canonicalizebf16.cpp.o
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_23_0_0_git -I/home/gha/actions-runner/_work/llvm-project/llvm-project/libc -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffixed-point -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 -fstack-protector-strong -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 -UNDEBUG -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.dir/canonicalizebf16.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.dir/canonicalizebf16.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.dir/canonicalizebf16.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:259:16: error: argument type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
259 | FPBits<T> sx(x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: error: incomplete result type '__llvm_libc_23_0_0_git::fputil::BFloat16' in function definition
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: note: in instantiation of member function '__llvm_libc_23_0_0_git::fputil::FPBits<__llvm_libc_23_0_0_git::fputil::BFloat16>::get_val' requested here
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:52: error: no matching function for call to 'bit_cast'
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/CPP/bit.h:48:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
43 | (sizeof(To) == sizeof(From)) &&
| ~~~~~~
44 | cpp::is_trivially_constructible<To>::value &&
45 | cpp::is_trivially_copyable<To>::value &&
46 | cpp::is_trivially_copyable<From>::value,
47 | To>
48 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1190:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1187 | (sizeof(To) == sizeof(From)) && cpp::is_trivially_copyable<To>::value &&
| ~~~~~~
1188 | cpp::is_trivially_copyable<From>::value && is_big_int<To>::value,
1189 | To>
1190 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1205:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1200 | sizeof(To) == sizeof(UInt<Bits>) &&
| ~~~~~~
1201 | cpp::is_trivially_constructible<To>::value &&
1202 | cpp::is_trivially_copyable<To>::value &&
1203 | cpp::is_trivially_copyable<UInt<Bits>>::value,
1204 | To>
1205 | bit_cast(const UInt<Bits> &from) {
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: error: calling 'get_val' with incomplete return type '__llvm_libc_23_0_0_git::fputil::BFloat16'
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: note: 'get_val' declared here
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: error: no viable overloaded '='
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: note: type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
```
</details>
<details>
<summary>libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.dir/canonicalizebf16.cpp.o</summary>
```
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.dir/canonicalizebf16.cpp.o
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_23_0_0_git -I/home/gha/actions-runner/_work/llvm-project/llvm-project/libc -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffixed-point -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 -fstack-protector-strong -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 -UNDEBUG -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.dir/canonicalizebf16.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.dir/canonicalizebf16.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.dir/canonicalizebf16.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:259:16: error: argument type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
259 | FPBits<T> sx(x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: error: incomplete result type '__llvm_libc_23_0_0_git::fputil::BFloat16' in function definition
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: note: in instantiation of member function '__llvm_libc_23_0_0_git::fputil::FPBits<__llvm_libc_23_0_0_git::fputil::BFloat16>::get_val' requested here
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:52: error: no matching function for call to 'bit_cast'
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/CPP/bit.h:48:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
43 | (sizeof(To) == sizeof(From)) &&
| ~~~~~~
44 | cpp::is_trivially_constructible<To>::value &&
45 | cpp::is_trivially_copyable<To>::value &&
46 | cpp::is_trivially_copyable<From>::value,
47 | To>
48 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1190:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1187 | (sizeof(To) == sizeof(From)) && cpp::is_trivially_copyable<To>::value &&
| ~~~~~~
1188 | cpp::is_trivially_copyable<From>::value && is_big_int<To>::value,
1189 | To>
1190 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1205:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1200 | sizeof(To) == sizeof(UInt<Bits>) &&
| ~~~~~~
1201 | cpp::is_trivially_constructible<To>::value &&
1202 | cpp::is_trivially_copyable<To>::value &&
1203 | cpp::is_trivially_copyable<UInt<Bits>>::value,
1204 | To>
1205 | bit_cast(const UInt<Bits> &from) {
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: error: calling 'get_val' with incomplete return type '__llvm_libc_23_0_0_git::fputil::BFloat16'
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: note: 'get_val' declared here
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: error: no viable overloaded '='
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: note: type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
```
</details>
<details>
<summary>libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.__internal__.dir/canonicalizebf16.cpp.o</summary>
```
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.__internal__.dir/canonicalizebf16.cpp.o
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_23_0_0_git -I/home/gha/actions-runner/_work/llvm-project/llvm-project/libc -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffixed-point -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 -fstack-protector-strong -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 -UNDEBUG -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.__internal__.dir/canonicalizebf16.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.__internal__.dir/canonicalizebf16.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizebf16.__NO_FMA_OPT.__internal__.dir/canonicalizebf16.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:259:16: error: argument type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
259 | FPBits<T> sx(x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: error: incomplete result type '__llvm_libc_23_0_0_git::fputil::BFloat16' in function definition
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: note: in instantiation of member function '__llvm_libc_23_0_0_git::fputil::FPBits<__llvm_libc_23_0_0_git::fputil::BFloat16>::get_val' requested here
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:13:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:52: error: no matching function for call to 'bit_cast'
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/CPP/bit.h:48:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
43 | (sizeof(To) == sizeof(From)) &&
| ~~~~~~
44 | cpp::is_trivially_constructible<To>::value &&
45 | cpp::is_trivially_copyable<To>::value &&
46 | cpp::is_trivially_copyable<From>::value,
47 | To>
48 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1190:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1187 | (sizeof(To) == sizeof(From)) && cpp::is_trivially_copyable<To>::value &&
| ~~~~~~
1188 | cpp::is_trivially_copyable<From>::value && is_big_int<To>::value,
1189 | To>
1190 | bit_cast(const From &from) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/big_int.h:1205:1: note: candidate template ignored: substitution failure [with To = __llvm_libc_23_0_0_git::fputil::BFloat16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_23_0_0_git::fputil::BFloat16'
1200 | sizeof(To) == sizeof(UInt<Bits>) &&
| ~~~~~~
1201 | cpp::is_trivially_constructible<To>::value &&
1202 | cpp::is_trivially_copyable<To>::value &&
1203 | cpp::is_trivially_copyable<UInt<Bits>>::value,
1204 | To>
1205 | bit_cast(const UInt<Bits> &from) {
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:70: error: calling 'get_val' with incomplete return type '__llvm_libc_23_0_0_git::fputil::BFloat16'
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:20:18: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::canonicalize<__llvm_libc_23_0_0_git::fputil::BFloat16, 0>' requested here
20 | return fputil::canonicalize(*cx, *x);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:850:27: note: 'get_val' declared here
850 | LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/macros/properties/types.h:65:8: note: forward declaration of '__llvm_libc_23_0_0_git::fputil::BFloat16'
65 | struct BFloat16;
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/math/generic/canonicalizebf16.cpp:10:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/canonicalizebf16.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: error: no viable overloaded '='
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:312:8: note: type '__llvm_libc_23_0_0_git::fputil::BFloat16' is incomplete
312 | cx = FPBits<T>::quiet_nan(sx.sign(), sx.get_explicit_mantissa()).get_val();
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/181467
More information about the libc-commits
mailing list