[clang] [clang][x86] Add constexpr support for BZHI intrinsics (PR #110508)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 06:24:01 PDT 2024
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 c0e97c4dfc936ed13ae9696f0615d7e648268bc9 0cb0f899c185bb729e1ee2f48d78d4ef81d0ace9 --extensions c,h,cpp -- clang/lib/AST/ExprConstant.cpp clang/lib/Headers/bmi2intrin.h clang/test/CodeGen/X86/bmi2-builtins.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/bmi2intrin.h b/clang/lib/Headers/bmi2intrin.h
index 31d97e6271..77fb081029 100644
--- a/clang/lib/Headers/bmi2intrin.h
+++ b/clang/lib/Headers/bmi2intrin.h
@@ -44,8 +44,7 @@
/// The lower 8 bits specify the bit number of the lowest bit to zero.
/// \returns The partially zeroed 32-bit value.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR
-_bzhi_u32(unsigned int __X, unsigned int __Y)
-{
+_bzhi_u32(unsigned int __X, unsigned int __Y) {
return __builtin_ia32_bzhi_si(__X, __Y);
}
@@ -160,8 +159,7 @@ _mulx_u32(unsigned int __X, unsigned int __Y, unsigned int *__P)
/// The lower 8 bits specify the bit number of the lowest bit to zero.
/// \returns The partially zeroed 64-bit value.
static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CONSTEXPR
-_bzhi_u64(unsigned long long __X, unsigned long long __Y)
-{
+_bzhi_u64(unsigned long long __X, unsigned long long __Y) {
return __builtin_ia32_bzhi_di(__X, __Y);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/110508
More information about the cfe-commits
mailing list