Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc][math] Implement iscanonical[f|l] as a libc math function #110565

Merged
merged 11 commits into from
Oct 2, 2024

Conversation

Sh0g0-1758
Copy link
Member

This PR implements the iscanonical function as part of the libc math library.

The addition of this function is crucial for completing the implementation of remaining math macros, as referenced in #109201

@llvmbot llvmbot added the libc label Sep 30, 2024
@Sh0g0-1758
Copy link
Member Author

@lntue

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 30, 2024

@llvm/pr-subscribers-libc

Author: Shourya Goel (Sh0g0-1758)

Changes

This PR implements the iscanonical function as part of the libc math library.

The addition of this function is crucial for completing the implementation of remaining math macros, as referenced in #109201


Full diff: https://github.com/llvm/llvm-project/pull/110565.diff

16 Files Affected:

  • (modified) libc/config/linux/aarch64/entrypoints.txt (+3)
  • (modified) libc/config/linux/riscv/entrypoints.txt (+3)
  • (modified) libc/config/linux/x86_64/entrypoints.txt (+3)
  • (modified) libc/src/math/CMakeLists.txt (+4)
  • (modified) libc/src/math/generic/CMakeLists.txt (+31)
  • (added) libc/src/math/generic/iscanonical.cpp (+23)
  • (added) libc/src/math/generic/iscanonicalf.cpp (+23)
  • (added) libc/src/math/generic/iscanonicall.cpp (+23)
  • (added) libc/src/math/iscanonical.h (+20)
  • (added) libc/src/math/iscanonicalf.h (+20)
  • (added) libc/src/math/iscanonicall.h (+20)
  • (modified) libc/test/src/math/smoke/CMakeLists.txt (+39)
  • (added) libc/test/src/math/smoke/IsCanonicalTest.h (+60)
  • (added) libc/test/src/math/smoke/iscanonical_test.cpp (+13)
  • (added) libc/test/src/math/smoke/iscanonicalf_test.cpp (+13)
  • (added) libc/test/src/math/smoke/iscanonicall_test.cpp (+13)
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 64fbe1a250c0ba..313f429541a574 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -378,6 +378,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.canonicalize
     libc.src.math.canonicalizef
     libc.src.math.canonicalizel
+    libc.src.math.iscanonical
+    libc.src.math.iscanonicalf
+    libc.src.math.iscanonicall
     libc.src.math.cbrt
     libc.src.math.cbrtf
     libc.src.math.ceil
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index ff3d821c664c5b..7d06774661bd7b 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -377,6 +377,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.canonicalize
     libc.src.math.canonicalizef
     libc.src.math.canonicalizel
+    libc.src.math.iscanonical
+    libc.src.math.iscanonicalf
+    libc.src.math.iscanonicall
     libc.src.math.cbrt
     libc.src.math.cbrtf
     libc.src.math.ceil
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index dd658af3bfb674..3d2a94fe2b1f0c 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -377,6 +377,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.canonicalize
     libc.src.math.canonicalizef
     libc.src.math.canonicalizel
+    libc.src.math.iscanonical
+    libc.src.math.iscanonicalf
+    libc.src.math.iscanonicall
     libc.src.math.cbrt
     libc.src.math.cbrtf
     libc.src.math.ceil
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 3cba34fc249322..a2c63b4ea70587 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -66,6 +66,10 @@ add_math_entrypoint_object(canonicalizel)
 add_math_entrypoint_object(canonicalizef16)
 add_math_entrypoint_object(canonicalizef128)
 
+add_math_entrypoint_object(iscanonical)
+add_math_entrypoint_object(iscanonicalf)
+add_math_entrypoint_object(iscanonicall)
+
 add_math_entrypoint_object(cbrt)
 add_math_entrypoint_object(cbrtf)
 
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index d0676d03420c68..c1f8856348af28 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -60,6 +60,37 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.basic_operations
 )
 
+add_entrypoint_object(
+  iscanonical
+  SRCS
+    iscanonical.cpp
+  HDRS
+    ../iscanonical.h
+  COMPILE_OPTIONS
+    -O3
+)
+
+add_entrypoint_object(
+  iscanonicalf
+  SRCS
+    iscanonicalf.cpp
+  HDRS
+    ../iscanonicalf.h
+  COMPILE_OPTIONS
+    -O3
+)
+
+add_entrypoint_object(
+  iscanonicall
+  SRCS
+    iscanonicall.cpp
+  HDRS
+    ../iscanonicall.h
+  COMPILE_OPTIONS
+    -O3
+)
+
+
 add_entrypoint_object(
   ceil
   SRCS
diff --git a/libc/src/math/generic/iscanonical.cpp b/libc/src/math/generic/iscanonical.cpp
new file mode 100644
index 00000000000000..6da76a43a1231c
--- /dev/null
+++ b/libc/src/math/generic/iscanonical.cpp
@@ -0,0 +1,23 @@
+//===-- Implementation of iscanonical function ----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/iscanonical.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
+  double temp;
+  if (fputil::canonicalize(temp, x) == 0)
+    return 1;
+  return 0;
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/iscanonicalf.cpp b/libc/src/math/generic/iscanonicalf.cpp
new file mode 100644
index 00000000000000..0662758353aac4
--- /dev/null
+++ b/libc/src/math/generic/iscanonicalf.cpp
@@ -0,0 +1,23 @@
+//===-- Implementation of iscanonicalf function ---------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/iscanonicalf.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, iscanonicalf, (float x)) {
+  float temp;
+  if (fputil::canonicalize(temp, x) == 0)
+    return 1;
+  return 0;
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/iscanonicall.cpp b/libc/src/math/generic/iscanonicall.cpp
new file mode 100644
index 00000000000000..29459c7a9ad972
--- /dev/null
+++ b/libc/src/math/generic/iscanonicall.cpp
@@ -0,0 +1,23 @@
+//===-- Implementation of iscanonicall function ---------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/iscanonicall.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, iscanonicall, (long double x)) {
+  long double temp;
+  if (fputil::canonicalize(temp, x) == 0)
+    return 1;
+  return 0;
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/iscanonical.h b/libc/src/math/iscanonical.h
new file mode 100644
index 00000000000000..14b2d17c8bbe9a
--- /dev/null
+++ b/libc/src/math/iscanonical.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for iscanonical -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISCANONICAL_H
+#define LLVM_LIBC_SRC_MATH_ISCANONICAL_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int iscanonical(double x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISCANONICAL_H
diff --git a/libc/src/math/iscanonicalf.h b/libc/src/math/iscanonicalf.h
new file mode 100644
index 00000000000000..fdb48bc2767be4
--- /dev/null
+++ b/libc/src/math/iscanonicalf.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for iscanonicalf ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISCANONICALF_H
+#define LLVM_LIBC_SRC_MATH_ISCANONICALF_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int iscanonicalf(float x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISCANONICALF_H
diff --git a/libc/src/math/iscanonicall.h b/libc/src/math/iscanonicall.h
new file mode 100644
index 00000000000000..edda6e334f1ab9
--- /dev/null
+++ b/libc/src/math/iscanonicall.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for iscanonicall ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISCANONICALL_H
+#define LLVM_LIBC_SRC_MATH_ISCANONICALL_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int iscanonicall(long double x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISCANONICALL_H
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 9f9203c491d044..5385d571d1a7e1 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -327,6 +327,45 @@ add_fp_unittest(
     libc.src.__support.integer_literals
 )
 
+add_fp_unittest(
+  iscanonical_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    iscanonical_test.cpp
+  HDRS
+    IsCanonicalTest.h
+  DEPENDS
+    libc.src.math.iscanonical
+    libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+  iscanonicalf_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    iscanonicalf_test.cpp
+  HDRS
+    IsCanonicalTest.h
+  DEPENDS
+    libc.src.math.iscanonicalf
+    libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+  iscanonicall_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    iscanonicall_test.cpp
+  HDRS
+    IsCanonicalTest.h
+  DEPENDS
+    libc.src.math.iscanonicall
+    libc.src.__support.FPUtil.fp_bits
+)
+
 add_fp_unittest(
   ceil_test
   SUITE
diff --git a/libc/test/src/math/smoke/IsCanonicalTest.h b/libc/test/src/math/smoke/IsCanonicalTest.h
new file mode 100644
index 00000000000000..47f21cde335a8f
--- /dev/null
+++ b/libc/test/src/math/smoke/IsCanonicalTest.h
@@ -0,0 +1,60 @@
+//===-- Utility class to test iscanonical[f|l] ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISCANONICALTEST_H
+#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISCANONICALTEST_H
+
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+#include "hdr/math_macros.h"
+
+template <typename T>
+class IsCanonicalTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
+
+  DECLARE_SPECIAL_CONSTANTS(T)
+
+public:
+  typedef int (*IsCanonicalFunc)(T);
+
+  void testSpecialNumbers(IsCanonicalFunc func) {
+    EXPECT_EQ(func(aNaN), 1);
+    EXPECT_EQ(func(neg_aNaN), 1);
+    EXPECT_EQ(func(sNaN), 0);
+    EXPECT_EQ(func(neg_sNaN), 0);
+    EXPECT_EQ(func(inf), 1);
+    EXPECT_EQ(func(neg_inf), 1);
+    EXPECT_EQ(func(min_normal), 1);
+    EXPECT_EQ(func(max_normal), 1);
+    EXPECT_EQ(func(neg_max_normal), 1);
+    EXPECT_EQ(func(min_denormal), 1);
+    EXPECT_EQ(func(neg_min_denormal), 1);
+    EXPECT_EQ(func(max_denormal), 1);
+    EXPECT_EQ(func(zero), 1);
+    EXPECT_EQ(func(neg_zero), 1);
+  }
+
+  void testRoundedNumbers(IsCanonicalFunc func) {
+    EXPECT_EQ(func(T(1.0)), 1);
+    EXPECT_EQ(func(T(-1.0)), 1);
+    EXPECT_EQ(func(T(10.0)), 1);
+    EXPECT_EQ(func(T(-10.0)), 1);
+    EXPECT_EQ(func(T(1234.0)), 1);
+    EXPECT_EQ(func(T(-1234.0)), 1);
+  }
+};
+
+#define LIST_ISCANONICAL_TESTS(T, func)                                        \
+  using LlvmLibcIsCanonicalTest = IsCanonicalTest<T>;                          \
+  TEST_F(LlvmLibcIsCanonicalTest, SpecialNumbers) {                            \
+    testSpecialNumbers(&func);                                                 \
+  }                                                                            \
+  TEST_F(LlvmLibcIsCanonicalTest, RoundedNubmers) { testRoundedNumbers(&func); }
+
+#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISCANONICALTEST_H
\ No newline at end of file
diff --git a/libc/test/src/math/smoke/iscanonical_test.cpp b/libc/test/src/math/smoke/iscanonical_test.cpp
new file mode 100644
index 00000000000000..2dd1c2ac6f0451
--- /dev/null
+++ b/libc/test/src/math/smoke/iscanonical_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for iscanonical -----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "IsCanonicalTest.h"
+
+#include "src/math/iscanonical.h"
+
+LIST_ISCANONICAL_TESTS(double, LIBC_NAMESPACE::iscanonical)
diff --git a/libc/test/src/math/smoke/iscanonicalf_test.cpp b/libc/test/src/math/smoke/iscanonicalf_test.cpp
new file mode 100644
index 00000000000000..eba8688f61f940
--- /dev/null
+++ b/libc/test/src/math/smoke/iscanonicalf_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for iscanonicalf ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "IsCanonicalTest.h"
+
+#include "src/math/iscanonicalf.h"
+
+LIST_ISCANONICAL_TESTS(float, LIBC_NAMESPACE::iscanonicalf)
diff --git a/libc/test/src/math/smoke/iscanonicall_test.cpp b/libc/test/src/math/smoke/iscanonicall_test.cpp
new file mode 100644
index 00000000000000..d180bcb7443e54
--- /dev/null
+++ b/libc/test/src/math/smoke/iscanonicall_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for iscanonicall ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "IsCanonicalTest.h"
+
+#include "src/math/iscanonicall.h"
+
+LIST_ISCANONICAL_TESTS(long double, LIBC_NAMESPACE::iscanonicall)

libc/config/linux/aarch64/entrypoints.txt Outdated Show resolved Hide resolved
libc/src/math/generic/CMakeLists.txt Outdated Show resolved Hide resolved
libc/src/math/generic/CMakeLists.txt Outdated Show resolved Hide resolved
libc/src/math/generic/iscanonical.cpp Outdated Show resolved Hide resolved
@Sh0g0-1758
Copy link
Member Author

@overmighty I think the unit tests for iscanonicalf16 are not running. I was not able to pin point the error. Can you please look into it.

libc/test/src/math/smoke/CMakeLists.txt Outdated Show resolved Hide resolved
libc/test/src/math/smoke/IsCanonicalTest.h Outdated Show resolved Hide resolved
@overmighty
Copy link
Member

@overmighty I think the unit tests for iscanonicalf16 are not running. I was not able to pin point the error. Can you please look into it.

This typo is probably why.

   DEPENDS
     libc.src.math.iscanonicalf16
-    lib.src.__support.FPUtil.fp_bits
+    libc.src.__support.FPUtil.fp_bits
   )

This dependency should be removed anyway, since FPBits is not used in the tests.

@Sh0g0-1758
Copy link
Member Author

Ah darn it! These little typos are so hard to spot :(
Thanks

@nickdesaulniers
Copy link
Member

Can we update the docs to list these functions as supported?

@Sh0g0-1758 Sh0g0-1758 changed the title [libc][math] Implement iscanonical[f|l] as a libc math function [libc][math] Implement iscanonical[f|l] as a libc math function Oct 1, 2024
@Sh0g0-1758
Copy link
Member Author

@overmighty

@overmighty
Copy link
Member

Ah darn it! These little typos are so hard to spot :( Thanks

If you run CMake with -DLIBC_CMAKE_VERBOSE_LOGGING=ON, at some point it'll print which tests are disabled and why (which targets are missing). E.g.,

-- Skipping unittest libc.test.src.__support.RPC.rpc_smoke_test.__unit__ as it has missing deps: libc.src.__support.RPC.rpc.

@Sh0g0-1758
Copy link
Member Author

@overmighty , could you please merge this.

@lntue lntue merged commit 2d784b1 into llvm:main Oct 2, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 2, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-dbg running on libc-aarch64-ubuntu while building libc at step 4 "annotate".

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

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)
...
[       OK ] LlvmLibcTruncTest.Range (31 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
[23/1014] Running unit test libc.test.src.math.fabs_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcFAbsTest.SpecialNumbers
[       OK ] LlvmLibcFAbsTest.SpecialNumbers (2 us)
[ RUN      ] LlvmLibcFAbsTest.Range
[       OK ] LlvmLibcFAbsTest.Range (33 ms)
Ran 2 tests.  PASS: 2  FAIL: 0
[24/1014] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -Iprojects/libc/src/math/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc -isystem projects/libc/include -fPIC -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 -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -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 -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 -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected unqualified-id
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:46: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                                             ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
4 errors generated.
[25/1014] Running unit test libc.test.src.math.modf_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcModfTest.SpecialNumbers
[       OK ] LlvmLibcModfTest.SpecialNumbers (3 us)
[ RUN      ] LlvmLibcModfTest.RoundedNubmers
[       OK ] LlvmLibcModfTest.RoundedNubmers (3 us)
[ RUN      ] LlvmLibcModfTest.Fractions
[       OK ] LlvmLibcModfTest.Fractions (3 us)
[ RUN      ] LlvmLibcModfTest.Range
[       OK ] LlvmLibcModfTest.Range (41 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
[26/1014] Running unit test libc.test.src.math.llrintf16_test.__unit__
[==========] Running 6 tests from 1 test suite.
[ RUN      ] LlvmLibcRoundToIntegerTest.InfinityAndNaN
[       OK ] LlvmLibcRoundToIntegerTest.InfinityAndNaN (4 us)
[ RUN      ] LlvmLibcRoundToIntegerTest.RoundNumbers
[       OK ] LlvmLibcRoundToIntegerTest.RoundNumbers (3 us)
[ RUN      ] LlvmLibcRoundToIntegerTest.Fractions
[       OK ] LlvmLibcRoundToIntegerTest.Fractions (70 us)
[ RUN      ] LlvmLibcRoundToIntegerTest.IntegerOverflow
[       OK ] LlvmLibcRoundToIntegerTest.IntegerOverflow (0 ns)
Step 7 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcTruncTest.Range (31 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
[23/1014] Running unit test libc.test.src.math.fabs_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcFAbsTest.SpecialNumbers
[       OK ] LlvmLibcFAbsTest.SpecialNumbers (2 us)
[ RUN      ] LlvmLibcFAbsTest.Range
[       OK ] LlvmLibcFAbsTest.Range (33 ms)
Ran 2 tests.  PASS: 2  FAIL: 0
[24/1014] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -Iprojects/libc/src/math/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc -isystem projects/libc/include -fPIC -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 -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -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 -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 -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected unqualified-id
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:46: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                                             ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
4 errors generated.
[25/1014] Running unit test libc.test.src.math.modf_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcModfTest.SpecialNumbers
[       OK ] LlvmLibcModfTest.SpecialNumbers (3 us)
[ RUN      ] LlvmLibcModfTest.RoundedNubmers
[       OK ] LlvmLibcModfTest.RoundedNubmers (3 us)
[ RUN      ] LlvmLibcModfTest.Fractions
[       OK ] LlvmLibcModfTest.Fractions (3 us)
[ RUN      ] LlvmLibcModfTest.Range
[       OK ] LlvmLibcModfTest.Range (41 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
[26/1014] Running unit test libc.test.src.math.llrintf16_test.__unit__
[==========] Running 6 tests from 1 test suite.
[ RUN      ] LlvmLibcRoundToIntegerTest.InfinityAndNaN
[       OK ] LlvmLibcRoundToIntegerTest.InfinityAndNaN (4 us)
[ RUN      ] LlvmLibcRoundToIntegerTest.RoundNumbers
[       OK ] LlvmLibcRoundToIntegerTest.RoundNumbers (3 us)
[ RUN      ] LlvmLibcRoundToIntegerTest.Fractions
[       OK ] LlvmLibcRoundToIntegerTest.Fractions (70 us)
[ RUN      ] LlvmLibcRoundToIntegerTest.IntegerOverflow
[       OK ] LlvmLibcRoundToIntegerTest.IntegerOverflow (0 ns)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 2, 2024

LLVM Buildbot has detected a new failure on builder libc-riscv64-debian-dbg running on libc-riscv64-debian while building libc at step 4 "annotate".

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

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)
...
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcExceptionStatusTest.RaiseAndCrash
[       OK ] LlvmLibcExceptionStatusTest.RaiseAndCrash (4 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[101/1164] Running unit test libc.test.src.fenv.feholdexcept_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcFEnvTest.RaiseAndCrash
[       OK ] LlvmLibcFEnvTest.RaiseAndCrash (4 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[102/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/src/math/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/include -fPIC -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 -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -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 -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 -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected unqualified-id
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:46: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                                             ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
4 errors generated.
[103/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonicalf.__internal__.dir/iscanonicalf.cpp.o
[104/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonicall.__internal__.dir/iscanonicall.cpp.o
[105/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonicalf128.__internal__.dir/iscanonicalf128.cpp.o
[106/1164] Running unit test libc.test.src.__support.hash_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTest.SanityCheck
[       OK ] LlvmLibcHashTest.SanityCheck (7 ms)
[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (2621 ms)
[ RUN      ] LlvmLibcHashTest.UniformLSB
[       OK ] LlvmLibcHashTest.UniformLSB (1116 ms)
[ RUN      ] LlvmLibcHashTest.UniformMSB
[       OK ] LlvmLibcHashTest.UniformMSB (481 us)
Ran 4 tests.  PASS: 4  FAIL: 0
[107/1164] Running unit test libc.test.src.math.cosf_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcCosfTest.SpecialNumbers
[       OK ] LlvmLibcCosfTest.SpecialNumbers (12 us)
[ RUN      ] LlvmLibcCosfTest.InFloatRange
[       OK ] LlvmLibcCosfTest.InFloatRange (3585 ms)
[ RUN      ] LlvmLibcCosfTest.SpecificBitPatterns
Step 7 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcExceptionStatusTest.RaiseAndCrash
[       OK ] LlvmLibcExceptionStatusTest.RaiseAndCrash (4 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[101/1164] Running unit test libc.test.src.fenv.feholdexcept_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcFEnvTest.RaiseAndCrash
[       OK ] LlvmLibcFEnvTest.RaiseAndCrash (4 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[102/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/src/math/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/include -fPIC -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 -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -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 -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 -std=c++17 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonical.__internal__.dir/iscanonical.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected unqualified-id
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:46: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                                             ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: error: expected ')'
LLVM_LIBC_FUNCTION(int, iscanonical, (double x)) {
                        ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/math/generic/iscanonical.cpp:16:25: note: to match this '('
4 errors generated.
[103/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonicalf.__internal__.dir/iscanonicalf.cpp.o
[104/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonicall.__internal__.dir/iscanonicall.cpp.o
[105/1164] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.iscanonicalf128.__internal__.dir/iscanonicalf128.cpp.o
[106/1164] Running unit test libc.test.src.__support.hash_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTest.SanityCheck
[       OK ] LlvmLibcHashTest.SanityCheck (7 ms)
[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (2621 ms)
[ RUN      ] LlvmLibcHashTest.UniformLSB
[       OK ] LlvmLibcHashTest.UniformLSB (1116 ms)
[ RUN      ] LlvmLibcHashTest.UniformMSB
[       OK ] LlvmLibcHashTest.UniformMSB (481 us)
Ran 4 tests.  PASS: 4  FAIL: 0
[107/1164] Running unit test libc.test.src.math.cosf_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcCosfTest.SpecialNumbers
[       OK ] LlvmLibcCosfTest.SpecialNumbers (12 us)
[ RUN      ] LlvmLibcCosfTest.InFloatRange
[       OK ] LlvmLibcCosfTest.InFloatRange (3585 ms)
[ RUN      ] LlvmLibcCosfTest.SpecificBitPatterns

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 2, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-libc-amdgpu-runtime running on omp-vega20-1 while building libc at step 10 "Add check check-offload".

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

Here is the relevant piece of the build log for the reference
Step 10 (Add check check-offload) failure: 1200 seconds without output running [b'ninja', b'-j 32', b'check-offload'], attempting to kill
...
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug49779.cpp (866 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug47654.cpp (867 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/test_libc.cpp (868 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug50022.cpp (869 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/wtime.c (870 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: offloading/bug49021.cpp (871 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: offloading/std_complex_arithmetic.cpp (872 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/complex_reduction.cpp (873 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug49021.cpp (874 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/std_complex_arithmetic.cpp (875 of 879)
command timed out: 1200 seconds without output running [b'ninja', b'-j 32', b'check-offload'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1237.198750

lntue pushed a commit that referenced this pull request Oct 2, 2024
…FUNCTION` macro (#110865)

It appears that #110565 fails because the macro definition of
iscanonical is included somewhere. This PR ensures that the macro
expands correctly and also removes the static_cast because implicit
conversion from bool to int is defined in C++.
EricWF pushed a commit to efcs/llvm-project that referenced this pull request Oct 2, 2024
…FUNCTION` macro (llvm#110865)

It appears that llvm#110565 fails because the macro definition of
iscanonical is included somewhere. This PR ensures that the macro
expands correctly and also removes the static_cast because implicit
conversion from bool to int is defined in C++.
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Oct 3, 2024
…vm#110565)

This PR implements the iscanonical function as part of the libc math
library.

The addition of this function is crucial for completing the
implementation of remaining math macros, as referenced in llvm#109201
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Oct 3, 2024
…FUNCTION` macro (llvm#110865)

It appears that llvm#110565 fails because the macro definition of
iscanonical is included somewhere. This PR ensures that the macro
expands correctly and also removes the static_cast because implicit
conversion from bool to int is defined in C++.
xgupta pushed a commit to xgupta/llvm-project that referenced this pull request Oct 4, 2024
…vm#110565)

This PR implements the iscanonical function as part of the libc math
library.

The addition of this function is crucial for completing the
implementation of remaining math macros, as referenced in llvm#109201
xgupta pushed a commit to xgupta/llvm-project that referenced this pull request Oct 4, 2024
…FUNCTION` macro (llvm#110865)

It appears that llvm#110565 fails because the macro definition of
iscanonical is included somewhere. This PR ensures that the macro
expands correctly and also removes the static_cast because implicit
conversion from bool to int is defined in C++.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants