[clang] [Headers][X86] Allow AVX1 fixed extraction intrinsics to be used in constexpr (PR #161218)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 29 08:37:59 PDT 2025
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,c -- clang/lib/Headers/avxintrin.h clang/test/CodeGen/X86/avx-builtins.c
``````````
: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/clang/lib/Headers/avxintrin.h b/clang/lib/Headers/avxintrin.h
index 65588f333..d6ba19a6c 100644
--- a/clang/lib/Headers/avxintrin.h
+++ b/clang/lib/Headers/avxintrin.h
@@ -2312,9 +2312,8 @@ _mm256_cvttps_epi32(__m256 __a)
/// A 256-bit vector of [4 x double].
/// \returns A 64 bit double containing the first element of the input vector.
static __inline double __DEFAULT_FN_ATTRS_CONSTEXPR
-_mm256_cvtsd_f64(__m256d __a)
-{
- return __a[0];
+_mm256_cvtsd_f64(__m256d __a) {
+ return __a[0];
}
/// Returns the first element of the input vector of [8 x i32].
@@ -2328,10 +2327,9 @@ _mm256_cvtsd_f64(__m256d __a)
/// A 256-bit vector of [8 x i32].
/// \returns A 32 bit integer containing the first element of the input vector.
static __inline int __DEFAULT_FN_ATTRS_CONSTEXPR
-_mm256_cvtsi256_si32(__m256i __a)
-{
- __v8si __b = (__v8si)__a;
- return __b[0];
+_mm256_cvtsi256_si32(__m256i __a) {
+ __v8si __b = (__v8si)__a;
+ return __b[0];
}
/// Returns the first element of the input vector of [8 x float].
@@ -2345,9 +2343,8 @@ _mm256_cvtsi256_si32(__m256i __a)
/// A 256-bit vector of [8 x float].
/// \returns A 32 bit float containing the first element of the input vector.
static __inline float __DEFAULT_FN_ATTRS_CONSTEXPR
-_mm256_cvtss_f32(__m256 __a)
-{
- return __a[0];
+_mm256_cvtss_f32(__m256 __a) {
+ return __a[0];
}
/* Vector replicate */
``````````
</details>
https://github.com/llvm/llvm-project/pull/161218
More information about the cfe-commits
mailing list