[clang] [clang][x86] Add constexpr support for all remaining BMI1 intrinsics (PR #110581)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 14:56:15 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 78ccffc05336201c90e2c0bb2ae929ea3a6eec2b 6dd203077d78ea7d757ab775a0a61b365c3359b8 --extensions c,h -- clang/lib/Headers/bmiintrin.h clang/test/CodeGen/X86/bmi-builtins.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/bmiintrin.h b/clang/lib/Headers/bmiintrin.h
index c7ce96096d..dd4851c303 100644
--- a/clang/lib/Headers/bmiintrin.h
+++ b/clang/lib/Headers/bmiintrin.h
@@ -178,23 +178,22 @@ constexpr
__attribute__((__always_inline__, __nodebug__, __target__("bmi")))
#endif
-/// Performs a bitwise AND of the second operand with the one's
-/// complement of the first operand.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c ANDN instruction.
-///
-/// \param __X
-/// An unsigned integer containing one of the operands.
-/// \param __Y
-/// An unsigned integer containing one of the operands.
-/// \returns An unsigned integer containing the bitwise AND of the second
-/// operand with the one's complement of the first operand.
-/// \see _andn_u32
-static __inline__ unsigned int __DEFAULT_FN_ATTRS
-__andn_u32(unsigned int __X, unsigned int __Y)
-{
+ /// Performs a bitwise AND of the second operand with the one's
+ /// complement of the first operand.
+ ///
+ /// \headerfile <x86intrin.h>
+ ///
+ /// This intrinsic corresponds to the \c ANDN instruction.
+ ///
+ /// \param __X
+ /// An unsigned integer containing one of the operands.
+ /// \param __Y
+ /// An unsigned integer containing one of the operands.
+ /// \returns An unsigned integer containing the bitwise AND of the second
+ /// operand with the one's complement of the first operand.
+ /// \see _andn_u32
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
+ __andn_u32(unsigned int __X, unsigned int __Y) {
return ~__X & __Y;
}
@@ -259,8 +258,9 @@ __bextr_u32(unsigned int __X, unsigned int __Y) {
/// \returns An unsigned integer whose least significant bits contain the
/// extracted bits.
/// \see __bextr_u32
-static __inline__ unsigned int __DEFAULT_FN_ATTRS
-_bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z) {
+static __inline__ unsigned int __DEFAULT_FN_ATTRS _bextr_u32(unsigned int __X,
+ unsigned int __Y,
+ unsigned int __Z) {
return __builtin_ia32_bextr_u32(__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/110581
More information about the cfe-commits
mailing list