[llvm] [bazel] Add tanpif rules after #147192 (PR #148909)
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 10:49:53 PDT 2025
https://github.com/rupprecht updated https://github.com/llvm/llvm-project/pull/148909
>From 210644cf99dc461cd5705ac48015536bd9e837d6 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Tue, 15 Jul 2025 10:44:58 -0700
Subject: [PATCH 1/2] [bazel] Add tanpif rules after #147192
---
.../llvm-project-overlay/libc/BUILD.bazel | 43 ++++++++++++-------
.../libc/test/src/math/BUILD.bazel | 8 ++++
.../libc/test/src/math/smoke/BUILD.bazel | 2 +
3 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 4ab0126291276..6bcadcddd2b39 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2124,7 +2124,7 @@ libc_support_library(
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_macros_attributes",
- ":llvm_libc_macros_float16_macros"
+ ":llvm_libc_macros_float16_macros",
],
)
@@ -2133,7 +2133,6 @@ libc_support_library(
hdrs = ["src/__support/math/expf16.h"],
deps = [
":__support_common",
- ":__support_libc_errno",
":__support_cpp_array",
":__support_fputil_cast",
":__support_fputil_except_value_utils",
@@ -2143,9 +2142,10 @@ libc_support_library(
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
+ ":__support_libc_errno",
":__support_macros_optimization",
":__support_math_expf16_utils",
- ":llvm_libc_macros_float16_macros"
+ ":llvm_libc_macros_float16_macros",
],
)
@@ -2153,8 +2153,8 @@ libc_support_library(
name = "__support_math_frexpf128",
hdrs = ["src/__support/math/frexpf128.h"],
deps = [
- ":__support_macros_properties_types",
":__support_fputil_manipulation_functions",
+ ":__support_macros_properties_types",
],
)
@@ -2162,10 +2162,10 @@ libc_support_library(
name = "__support_math_frexpf16",
hdrs = ["src/__support/math/frexpf16.h"],
deps = [
+ ":__support_fputil_manipulation_functions",
":__support_macros_config",
":__support_macros_properties_types",
- ":__support_fputil_manipulation_functions",
- ":llvm_libc_macros_float16_macros"
+ ":llvm_libc_macros_float16_macros",
],
)
@@ -2183,7 +2183,7 @@ libc_support_library(
deps = [
":__support_fputil_manipulation_functions",
":__support_macros_properties_types",
- ":llvm_libc_types_float128"
+ ":llvm_libc_types_float128",
],
)
@@ -2191,9 +2191,9 @@ libc_support_library(
name = "__support_math_ldexpf16",
hdrs = ["src/__support/math/ldexpf16.h"],
deps = [
- ":__support_macros_properties_types",
":__support_fputil_manipulation_functions",
- ":llvm_libc_macros_float16_macros"
+ ":__support_macros_properties_types",
+ ":llvm_libc_macros_float16_macros",
],
)
@@ -2217,8 +2217,8 @@ libc_support_library(
name = "__support_math_exp_utils",
hdrs = ["src/__support/math/exp_utils.h"],
deps = [
- ":__support_cpp_optional",
":__support_cpp_bit",
+ ":__support_cpp_optional",
":__support_fputil_fp_bits",
],
)
@@ -2227,10 +2227,9 @@ libc_support_library(
name = "__support_math_exp",
hdrs = ["src/__support/math/exp.h"],
deps = [
- ":__support_math_exp_constants",
- ":__support_math_exp_utils",
":__support_cpp_bit",
":__support_cpp_optional",
+ ":__support_fputil_double_double",
":__support_fputil_dyadic_float",
":__support_fputil_fenv_impl",
":__support_fputil_fp_bits",
@@ -2239,9 +2238,10 @@ libc_support_library(
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
":__support_fputil_triple_double",
- ":__support_fputil_double_double",
":__support_integer_literals",
":__support_macros_optimization",
+ ":__support_math_exp_constants",
+ ":__support_math_exp_utils",
],
)
@@ -3296,13 +3296,13 @@ libc_math_function(
name = "frexpf128",
additional_deps = [
":__support_math_frexpf128",
- ]
+ ],
)
libc_math_function(
name = "frexpf16",
additional_deps = [
- ":__support_math_frexpf16"
+ ":__support_math_frexpf16",
],
)
@@ -3389,7 +3389,7 @@ libc_math_function(
name = "ldexpf",
additional_deps = [
":__support_math_ldexpf",
- ]
+ ],
)
libc_math_function(name = "ldexpl")
@@ -4001,6 +4001,17 @@ libc_math_function(
],
)
+libc_math_function(
+ name = "tanpif",
+ additional_deps = [
+ ":sincosf_utils",
+ ":hdr_fenv_macros",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_fputil_multiply_add",
+ ],
+)
+
libc_math_function(
name = "tanpif16",
additional_deps = [
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
index 23cead18de4c1..d20922df1b8b5 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
@@ -530,6 +530,14 @@ math_mpfr_test(
],
)
+math_mpfr_test(
+ name = "tanpif",
+ hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
+)
+
math_mpfr_test(
name = "sqrt",
hdrs = ["SqrtTest.h"],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
index cf25376878347..4df1c4508d764 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
@@ -1518,6 +1518,8 @@ math_test(name = "tanf")
math_test(name = "tanhf")
+math_test(name = "tanpif")
+
math_test(
name = "totalorder",
hdrs = ["TotalOrderTest.h"],
>From 0c6acf4bf4d0162ea8e53e5651fb3ab2b640cf4c Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Tue, 15 Jul 2025 10:49:41 -0700
Subject: [PATCH 2/2] revert buildifier formatting
---
.../llvm-project-overlay/libc/BUILD.bazel | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 6bcadcddd2b39..fe843d3207ceb 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2124,7 +2124,7 @@ libc_support_library(
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_macros_attributes",
- ":llvm_libc_macros_float16_macros",
+ ":llvm_libc_macros_float16_macros"
],
)
@@ -2133,6 +2133,7 @@ libc_support_library(
hdrs = ["src/__support/math/expf16.h"],
deps = [
":__support_common",
+ ":__support_libc_errno",
":__support_cpp_array",
":__support_fputil_cast",
":__support_fputil_except_value_utils",
@@ -2142,10 +2143,9 @@ libc_support_library(
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
- ":__support_libc_errno",
":__support_macros_optimization",
":__support_math_expf16_utils",
- ":llvm_libc_macros_float16_macros",
+ ":llvm_libc_macros_float16_macros"
],
)
@@ -2153,8 +2153,8 @@ libc_support_library(
name = "__support_math_frexpf128",
hdrs = ["src/__support/math/frexpf128.h"],
deps = [
- ":__support_fputil_manipulation_functions",
":__support_macros_properties_types",
+ ":__support_fputil_manipulation_functions",
],
)
@@ -2162,10 +2162,10 @@ libc_support_library(
name = "__support_math_frexpf16",
hdrs = ["src/__support/math/frexpf16.h"],
deps = [
- ":__support_fputil_manipulation_functions",
":__support_macros_config",
":__support_macros_properties_types",
- ":llvm_libc_macros_float16_macros",
+ ":__support_fputil_manipulation_functions",
+ ":llvm_libc_macros_float16_macros"
],
)
@@ -2183,7 +2183,7 @@ libc_support_library(
deps = [
":__support_fputil_manipulation_functions",
":__support_macros_properties_types",
- ":llvm_libc_types_float128",
+ ":llvm_libc_types_float128"
],
)
@@ -2191,9 +2191,9 @@ libc_support_library(
name = "__support_math_ldexpf16",
hdrs = ["src/__support/math/ldexpf16.h"],
deps = [
- ":__support_fputil_manipulation_functions",
":__support_macros_properties_types",
- ":llvm_libc_macros_float16_macros",
+ ":__support_fputil_manipulation_functions",
+ ":llvm_libc_macros_float16_macros"
],
)
@@ -2217,8 +2217,8 @@ libc_support_library(
name = "__support_math_exp_utils",
hdrs = ["src/__support/math/exp_utils.h"],
deps = [
- ":__support_cpp_bit",
":__support_cpp_optional",
+ ":__support_cpp_bit",
":__support_fputil_fp_bits",
],
)
@@ -2227,9 +2227,10 @@ libc_support_library(
name = "__support_math_exp",
hdrs = ["src/__support/math/exp.h"],
deps = [
+ ":__support_math_exp_constants",
+ ":__support_math_exp_utils",
":__support_cpp_bit",
":__support_cpp_optional",
- ":__support_fputil_double_double",
":__support_fputil_dyadic_float",
":__support_fputil_fenv_impl",
":__support_fputil_fp_bits",
@@ -2238,10 +2239,9 @@ libc_support_library(
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
":__support_fputil_triple_double",
+ ":__support_fputil_double_double",
":__support_integer_literals",
":__support_macros_optimization",
- ":__support_math_exp_constants",
- ":__support_math_exp_utils",
],
)
@@ -3296,13 +3296,13 @@ libc_math_function(
name = "frexpf128",
additional_deps = [
":__support_math_frexpf128",
- ],
+ ]
)
libc_math_function(
name = "frexpf16",
additional_deps = [
- ":__support_math_frexpf16",
+ ":__support_math_frexpf16"
],
)
@@ -3389,7 +3389,7 @@ libc_math_function(
name = "ldexpf",
additional_deps = [
":__support_math_ldexpf",
- ],
+ ]
)
libc_math_function(name = "ldexpl")
More information about the llvm-commits
mailing list