[llvm] Use Log2_64_Ceil to compute PowerOf2Ceil (PR #67580)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 27 18:14:20 PDT 2023
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 558c1f123ea7f3134c1f34124df6921376465494 bee142ee41873df6e288ae8a2ff6be481ff6fe8d -- llvm/include/llvm/Support/MathExtras.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index 60c4edddd..aa4f4d2ed 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -359,7 +359,7 @@ constexpr inline uint64_t NextPowerOf2(uint64_t A) {
/// Returns the power of two which is greater than or equal to the given value.
/// Essentially, it is a ceil operation across the domain of powers of two.
inline uint64_t PowerOf2Ceil(uint64_t A) {
- if (!A || A > UINT64_MAX/2)
+ if (!A || A > UINT64_MAX / 2)
return 0;
return UINT64_C(1) << Log2_64_Ceil(A);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/67580
More information about the llvm-commits
mailing list