[clang] [X86] avx512fp16intrin.h - allow _mm512_cvtsh_h to be used in constexpr (PR #162114)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 6 09:33:56 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 c,h -- clang/lib/Headers/avx512fp16intrin.h clang/test/CodeGen/X86/avx512fp16-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/avx512fp16intrin.h b/clang/lib/Headers/avx512fp16intrin.h
index d951ba0f0..51c7de26c 100644
--- a/clang/lib/Headers/avx512fp16intrin.h
+++ b/clang/lib/Headers/avx512fp16intrin.h
@@ -41,8 +41,8 @@ typedef _Float16 __m512h_u __attribute__((__vector_size__(64), __aligned__(1)));
 #define __DEFAULT_FN_ATTRS128_CONSTEXPR __DEFAULT_FN_ATTRS128
 #endif
 
-static __inline__ _Float16 __DEFAULT_FN_ATTRS512_CONSTEXPR
-_mm512_cvtsh_h(__m512h __a) {
+static __inline__ _Float16
+    __DEFAULT_FN_ATTRS512_CONSTEXPR _mm512_cvtsh_h(__m512h __a) {
   return __a[0];
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/162114


More information about the cfe-commits mailing list