github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,inc,cl --
libclc/clc/include/clc/math/clc_get_twobypi_bits.h
libclc/clc/include/clc/math/clc_get_twobypi_bits_decl.inc
libclc/clc/lib/amdgpu/math/clc_get_twobypi_bits.cl
libclc/clc/lib/generic/math/clc_get_twobypi_bits.cl
libclc/clc/lib/generic/math/clc_get_twobypi_bits.inc
libclc/clc/include/clc/math/clc_sincos_helpers_fp64_decl.inc
libclc/clc/include/clc/math/tables.h libclc/clc/lib/generic/math/clc_cos.inc
libclc/clc/lib/generic/math/clc_sin.inc
libclc/clc/lib/generic/math/clc_sincos_helpers.cl
libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
libclc/clc/lib/generic/math/clc_tables.cl
libclc/clc/lib/generic/math/clc_tan.inc --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
b/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
index cdb947c30..cba8521e5 100644
--- a/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
+++ b/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
@@ -31,9 +31,23 @@ __clc_sincos_reduced_eval(__CLC_DOUBLEN x, __CLC_DOUBLEN y) {
__CLC_DOUBLEN u = 1.0 - t;
__CLC_DOUBLEN v = u - r;
- __CLC_DOUBLEN cxy = t + __clc_mad(x2 * x2, __clc_mad(x2, __clc_mad(x2,
__clc_mad(x2, __clc_mad(x2, __clc_mad(x2, C5, C4), C3), C2), C1), C0),
__clc_mad(x, -y, v));
- __CLC_DOUBLEN sxy = __clc_mad(x2, __clc_mad(x2, __clc_mad(x2, __clc_mad(x2,
S5, S4), S3), S2), S1);
- sxy = x - __clc_mad(-x3, S0, __clc_mad(x2, __clc_mad(-x3, sxy,
__CLC_FP_LIT(0.5) * y), -y));
+ __CLC_DOUBLEN cxy =
+ t +
+ __clc_mad(
+ x2 * x2,
+ __clc_mad(
+ x2,
+ __clc_mad(
+ x2,
+ __clc_mad(x2, __clc_mad(x2, __clc_mad(x2, C5, C4), C3), C2),
+ C1),
+ C0),
+ __clc_mad(x, -y, v));
+ __CLC_DOUBLEN sxy = __clc_mad(
+ x2, __clc_mad(x2, __clc_mad(x2, __clc_mad(x2, S5, S4), S3), S2), S1);
+ sxy = x - __clc_mad(
+ -x3, S0,
+ __clc_mad(x2, __clc_mad(-x3, sxy, __CLC_FP_LIT(0.5) * y), -y));
__CLC_SINCOS_RET_GENTYPE ret;
ret.cos = cxy;
@@ -45,18 +59,50 @@ _CLC_DEF _CLC_OVERLOAD __CLC_DOUBLEN
__clc_tan_reduced_eval(__CLC_DOUBLEN x,
__CLC_DOUBLEN xx,
__CLC_INTN is_odd)
{
__CLC_DOUBLEN s = __clc_ep_sqr(__clc_ep_make_pair(x, xx)).hi;
- __CLC_DOUBLEN p = s * __clc_mad(s, __clc_mad(s, __clc_mad(s, __clc_mad(s,
- __clc_mad(s, __clc_mad(s, __clc_mad(s, __clc_mad(s,
- __clc_mad(s, __clc_mad(s, __clc_mad(s, __clc_mad(s,
- __clc_mad(s,
- 0x1.5e089c751c08cp-16, -0x1.78809a9a29f71p-15),
- 0x1.7746f90a8aaep-14), -0x1.bb44da6fbf144p-16),
- 0x1.1e634a7943acfp-13), 0x1.d250fdeb68febp-13),
- 0x1.37fd9b58c4d95p-11), 0x1.7d5af15120e2cp-10),
- 0x1.d6d93e09491dfp-9), 0x1.226e12033784dp-7),
- 0x1.664f49ac36ae2p-6), 0x1.ba1ba1b451c21p-5),
- 0x1.11111111185b7p-3), 0x1.55555555554eep-2);
- __CLC_EP_PAIR t = __clc_ep_fast_add(__clc_ep_make_pair(x, xx),
__clc_ep_mul(x, p));
+ __CLC_DOUBLEN p =
+ s *
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+ __clc_mad(
+ s,
+
0x1.5e089c751c08cp-16,
+
-0x1.78809a9a29f71p-15),
+ 0x1.7746f90a8aaep-14),
+ -0x1.bb44da6fbf144p-16),
+ 0x1.1e634a7943acfp-13),
+ 0x1.d250fdeb68febp-13),
+ 0x1.37fd9b58c4d95p-11),
+ 0x1.7d5af15120e2cp-10),
+ 0x1.d6d93e09491dfp-9),
+ 0x1.226e12033784dp-7),
+ 0x1.664f49ac36ae2p-6),
+ 0x1.ba1ba1b451c21p-5),
+ 0x1.11111111185b7p-3),
+ 0x1.55555555554eep-2);
+ __CLC_EP_PAIR t =
+ __clc_ep_fast_add(__clc_ep_make_pair(x, xx), __clc_ep_mul(x, p));
__CLC_EP_PAIR tr = __clc_ep_fast_recip(t);
return __CLC_CONVERT_LONGN(is_odd) ? -tr.hi : t.hi;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/187455
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits