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 cl,h --
libclc/clc/lib/generic/math/clc_subnormal_config.cl
libclc/clc/include/clc/math/clc_subnormal_config.h
libclc/clc/include/clc/math/math.h libclc/clc/lib/generic/math/clc_exp10.cl
libclc/clc/lib/generic/math/clc_hypot.cl libclc/clc/lib/generic/math/clc_pow.cl
libclc/clc/lib/generic/math/clc_pown.cl libclc/clc/lib/generic/math/clc_powr.cl
--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_subnormal_config.cl
b/libclc/clc/lib/generic/math/clc_subnormal_config.cl
index 9f93ec584..ba410d3a8 100644
--- a/libclc/clc/lib/generic/math/clc_subnormal_config.cl
+++ b/libclc/clc/lib/generic/math/clc_subnormal_config.cl
@@ -15,7 +15,8 @@ _CLC_DEF bool __clc_fp16_subnormals_supported() {
// SPIR-V doesn't support llvm.canonicalize. Synthesize a subnormal by
halving
// the smallest normal. If subnormals are not supported it will flush to +0.
half smallest_normal = 0x1p-14h;
- half sub = smallest_normal * 0.5h; // Expected 0x1p-15h (subnormal) if
supported
+ half sub =
+ smallest_normal * 0.5h; // Expected 0x1p-15h (subnormal) if supported
return !__builtin_isfpclass(sub, __FPCLASS_POSZERO);
}
#endif // cl_khr_fp16
@@ -24,7 +25,8 @@ _CLC_DEF bool __clc_fp32_subnormals_supported() {
// SPIR-V doesn't support llvm.canonicalize. Synthesize a subnormal by
halving
// the smallest normal. If subnormals are not supported it will flush to +0.
float smallest_normal = 0x1p-126f;
- float sub = smallest_normal * 0.5f; // Should be 0x1p-127f (subnormal) if
supported
+ float sub =
+ smallest_normal * 0.5f; // Should be 0x1p-127f (subnormal) if supported
return !__builtin_isfpclass(sub, __FPCLASS_POSZERO);
}
@@ -34,7 +36,8 @@ _CLC_DEF bool __clc_fp64_subnormals_supported() {
// SPIR-V doesn't support llvm.canonicalize. Synthesize a subnormal by
halving
// the smallest normal. If subnormals are not supported it will flush to +0.
double smallest_normal = 0x1p-1022;
- double sub = smallest_normal * 0.5; // Should be 0x1p-1023 (subnormal) if
supported
+ double sub =
+ smallest_normal * 0.5; // Should be 0x1p-1023 (subnormal) if supported
return !__builtin_isfpclass(sub, __FPCLASS_POSZERO);
}
#endif // cl_khr_fp64
``````````
</details>
https://github.com/llvm/llvm-project/pull/157633
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits