[libc-commits] [libc] [libc][math] Optimize maximum and minimum functions using builtins when available (PR #100002)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Tue Jul 23 15:03:53 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-dbg-asan` running on `libc-x86_64-debian` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/2795
Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[2/501] Building CXX object projects/libc/src/inttypes/CMakeFiles/libc.src.inttypes.imaxdiv.dir/imaxdiv.cpp.o
[3/501] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/exit.cpp.o
[4/501] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.pid.dir/pid.cpp.o
[5/501] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/fcntl.cpp.o
[6/501] Building CXX object projects/libc/src/__support/threads/linux/CMakeFiles/libc.src.__support.threads.linux.callonce.dir/callonce.cpp.o
[7/501] Building CXX object projects/libc/src/inttypes/CMakeFiles/libc.src.inttypes.strtoumax.dir/strtoumax.cpp.o
[8/501] Building CXX object projects/libc/src/inttypes/CMakeFiles/libc.src.inttypes.strtoimax.dir/strtoimax.cpp.o
[9/501] Building CXX object projects/libc/src/__support/File/linux/CMakeFiles/libc.src.__support.File.linux.file.dir/file.cpp.o
[10/501] Building CXX object projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.signal_to_string.dir/signal_to_string.cpp.o
[11/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -fpie -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 -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/canonicalize.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/canonicalize.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:52:25: error: unknown type name 'float16'
template <> LIBC_INLINE float16 max(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:52:37: error: unknown type name 'float16'
template <> LIBC_INLINE float16 max(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:52:48: error: unknown type name 'float16'
template <> LIBC_INLINE float16 max(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:53:10: error: use of undeclared identifier 'float16'
FPBits<float16> x_bits(x);
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:54:10: error: use of undeclared identifier 'float16'
FPBits<float16> y_bits(y);
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:90:25: error: unknown type name 'float16'
template <> LIBC_INLINE float16 min(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:90:37: error: unknown type name 'float16'
template <> LIBC_INLINE float16 min(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:90:48: error: unknown type name 'float16'
template <> LIBC_INLINE float16 min(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:91:10: error: use of undeclared identifier 'float16'
FPBits<float16> x_bits(x);
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:92:10: error: use of undeclared identifier 'float16'
FPBits<float16> y_bits(y);
^
10 errors generated.
[12/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.ceilf128.dir/ceilf128.cpp.o
[13/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.ceill.dir/ceill.cpp.o
[14/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -fpie -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 -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/canonicalizef128.cpp
Step 6 (build libc) failure: build libc (failure)
...
[2/501] Building CXX object projects/libc/src/inttypes/CMakeFiles/libc.src.inttypes.imaxdiv.dir/imaxdiv.cpp.o
[3/501] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/exit.cpp.o
[4/501] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.pid.dir/pid.cpp.o
[5/501] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/fcntl.cpp.o
[6/501] Building CXX object projects/libc/src/__support/threads/linux/CMakeFiles/libc.src.__support.threads.linux.callonce.dir/callonce.cpp.o
[7/501] Building CXX object projects/libc/src/inttypes/CMakeFiles/libc.src.inttypes.strtoumax.dir/strtoumax.cpp.o
[8/501] Building CXX object projects/libc/src/inttypes/CMakeFiles/libc.src.inttypes.strtoimax.dir/strtoimax.cpp.o
[9/501] Building CXX object projects/libc/src/__support/File/linux/CMakeFiles/libc.src.__support.File.linux.file.dir/file.cpp.o
[10/501] Building CXX object projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.signal_to_string.dir/signal_to_string.cpp.o
[11/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -fpie -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 -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalize.dir/canonicalize.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/canonicalize.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/canonicalize.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:52:25: error: unknown type name 'float16'
template <> LIBC_INLINE float16 max(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:52:37: error: unknown type name 'float16'
template <> LIBC_INLINE float16 max(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:52:48: error: unknown type name 'float16'
template <> LIBC_INLINE float16 max(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:53:10: error: use of undeclared identifier 'float16'
FPBits<float16> x_bits(x);
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:54:10: error: use of undeclared identifier 'float16'
FPBits<float16> y_bits(y);
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:90:25: error: unknown type name 'float16'
template <> LIBC_INLINE float16 min(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:90:37: error: unknown type name 'float16'
template <> LIBC_INLINE float16 min(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:90:48: error: unknown type name 'float16'
template <> LIBC_INLINE float16 min(float16 x, float16 y) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:91:10: error: use of undeclared identifier 'float16'
FPBits<float16> x_bits(x);
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/FPUtil/BasicOperations.h:92:10: error: use of undeclared identifier 'float16'
FPBits<float16> y_bits(y);
^
10 errors generated.
[12/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.ceilf128.dir/ceilf128.cpp.o
[13/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.ceill.dir/ceill.cpp.o
[14/501] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -fpie -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 -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.canonicalizef128.dir/canonicalizef128.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/canonicalizef128.cpp
```
https://github.com/llvm/llvm-project/pull/100002
More information about the libc-commits
mailing list