[libc-commits] [libc] [libc][math][c23] Implement `asinpi` for `f32` and `f64` (PR #181475)

via libc-commits libc-commits at lists.llvm.org
Sat Feb 14 05:02:43 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/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__build__.dir/shared_math_test.cpp.o</summary>

```
FAILED: libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__build__.dir/shared_math_test.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 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/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 -UNDEBUG -mavx2 -mfma -msse4.2 -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 -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_TEST=UNIT -MD -MT libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__build__.dir/shared_math_test.cpp.o -MF libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__build__.dir/shared_math_test.cpp.o.d -o libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__build__.dir/shared_math_test.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/asinpif.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:40: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:56: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:33: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:49: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:65: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:33: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:49: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:65: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                                 ^~~~~~~~~~~
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif16.h:38:26: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<double, _Float16>' requested here
38 |   double x_abs = fputil::cast<double>(xbits.abs().get_val());
|                          ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/hypotf16.h:55:22: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<float, _Float16>' requested here
55 |   float af = fputil::cast<float>(a_bits.get_val());
|                      ^
10 errors generated.
```
</details>
<details>
<summary>libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__build__.dir/shared_math_test.cpp.o</summary>

```
FAILED: libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__build__.dir/shared_math_test.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 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/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 -UNDEBUG -msse4.2 -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 -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_TEST=UNIT -MD -MT libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__build__.dir/shared_math_test.cpp.o -MF libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__build__.dir/shared_math_test.cpp.o.d -o libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__build__.dir/shared_math_test.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/asinpif.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:40: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:56: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:33: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:49: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:65: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:33: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:49: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:65: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                                 ^~~~~~~~~~~
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif16.h:38:26: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<double, _Float16>' requested here
38 |   double x_abs = fputil::cast<double>(xbits.abs().get_val());
|                          ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/hypotf16.h:55:22: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<float, _Float16>' requested here
55 |   float af = fputil::cast<float>(a_bits.get_val());
|                      ^
10 errors generated.
```
</details>
<details>
<summary>libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o</summary>

```
FAILED: libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_ROUND_OPT.__build__.dir/shared_math_test.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 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/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 -UNDEBUG -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 -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_TEST=UNIT -MD -MT libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o -MF libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o.d -o libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/asinpif.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:40: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:56: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:33: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:49: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:65: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:33: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:49: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:65: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                                 ^~~~~~~~~~~
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif16.h:38:26: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<double, _Float16>' requested here
38 |   double x_abs = fputil::cast<double>(xbits.abs().get_val());
|                          ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/hypotf16.h:55:22: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<float, _Float16>' requested here
55 |   float af = fputil::cast<float>(a_bits.get_val());
|                      ^
10 errors generated.
```
</details>
<details>
<summary>libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o</summary>

```
FAILED: libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__NO_ROUND_OPT.__build__.dir/shared_math_test.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 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/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 -UNDEBUG -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 -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_TEST=UNIT -MD -MT libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o -MF libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o.d -o libc/test/shared/CMakeFiles/libc.test.shared.shared_math_test.__unit__.__NO_FMA_OPT.__NO_ROUND_OPT.__build__.dir/shared_math_test.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/asinpif.h:12:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:40: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:77:56: error: use of undeclared identifier 'POLY_COEFFS'
77 |     return v * fputil::polyeval(v * v, POLY_COEFFS[0], POLY_COEFFS[1],
|                                                        ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:33: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:49: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:78:65: error: use of undeclared identifier 'POLY_COEFFS'
78 |                                 POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
|                                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:33: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:49: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                 ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif.h:79:65: error: use of undeclared identifier 'POLY_COEFFS'
79 |                                 POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
|                                                                 ^~~~~~~~~~~
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/asinpif16.h:38:26: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<double, _Float16>' requested here
38 |   double x_abs = fputil::cast<double>(xbits.abs().get_val());
|                          ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/shared/shared_math_test.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/shared/math/acos.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/acos.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/sqrt.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt.h:17:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/cast.h:55:18: error: shift count is negative [-Werror,-Wshift-count-negative]
55 |           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
|                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/math/hypotf16.h:55:22: note: in instantiation of function template specialization '__llvm_libc_23_0_0_git::fputil::cast<float, _Float16>' requested here
55 |   float af = fputil::cast<float>(a_bits.get_val());
|                      ^
10 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/181475


More information about the libc-commits mailing list