Skip to content

Conversation

moorabbit
Copy link
Contributor

The following AVX[512] intrinsics are now constexpr:

  • _mm_mask_cvtepi32_pd
  • _mm_maskz_cvtepi32_pd
  • _mm_mask_cvtepi32_ps
  • _mm_maskz_cvtepi32_ps
  • _mm_cvtepu32_pd
  • _mm_mask_cvtepu32_pd
  • _mm_maskz_cvtepu32_pd
  • _mm_cvtepu32_ps
  • _mm_mask_cvtepu32_ps
  • _mm_maskz_cvtepu32_ps
  • _mm256_mask_cvtepi32_pd
  • _mm256_maskz_cvtepi32_pd
  • _mm256_mask_cvtepi32_ps
  • _mm256_maskz_cvtepi32_ps
  • _mm256_cvtepu32_pd
  • _mm256_mask_cvtepu32_pd
  • _mm256_maskz_cvtepu32_pd
  • _mm256_cvtepu32_ps
  • _mm256_mask_cvtepu32_ps
  • _mm256_maskz_cvtepu32_ps
  • _mm512_cvtepi64_pd
  • _mm512_mask_cvtepi64_pd
  • _mm512_maskz_cvtepi64_pd
  • _mm512_cvtepu64_pd
  • _mm512_mask_cvtepu64_pd
  • _mm512_maskz_cvtepu64_pd

This PR is part 2 [part 1] of a series of PRs fixing #155798

Copy link

github-actions bot commented Sep 3, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff origin/main HEAD --extensions h,c -- clang/lib/Headers/avx512dqintrin.h clang/lib/Headers/avx512vlintrin.h clang/test/CodeGen/X86/avx512dq-builtins.c clang/test/CodeGen/X86/avx512vl-builtins.c

⚠️
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.
⚠️

View the diff from clang-format here.
diff --git a/clang/lib/Headers/avx512dqintrin.h b/clang/lib/Headers/avx512dqintrin.h
index ee211d3ea..a8435d1cb 100644
--- a/clang/lib/Headers/avx512dqintrin.h
+++ b/clang/lib/Headers/avx512dqintrin.h
@@ -483,8 +483,8 @@ _mm512_maskz_cvtps_epu64 (__mmask8 __U, __m256 __A) {
                                              (__v8di)_mm512_setzero_si512(), \
                                              (__mmask8)(U), (int)(R)))
 
-static __inline__ __m512d __DEFAULT_FN_ATTRS512_CONSTEXPR
-_mm512_cvtepi64_pd(__m512i __A) {
+static __inline__ __m512d
+    __DEFAULT_FN_ATTRS512_CONSTEXPR _mm512_cvtepi64_pd(__m512i __A) {
   return (__m512d)__builtin_convertvector((__v8di)__A, __v8df);
 }
 
@@ -713,8 +713,8 @@ _mm512_maskz_cvttps_epu64 (__mmask8 __U, __m256 __A) {
                                               (__v8di)_mm512_setzero_si512(), \
                                               (__mmask8)(U), (int)(R)))
 
-static __inline__ __m512d __DEFAULT_FN_ATTRS512_CONSTEXPR
-_mm512_cvtepu64_pd(__m512i __A) {
+static __inline__ __m512d
+    __DEFAULT_FN_ATTRS512_CONSTEXPR _mm512_cvtepu64_pd(__m512i __A) {
   return (__m512d)__builtin_convertvector((__v8du)__A, __v8df);
 }
 

@moorabbit
Copy link
Contributor Author

@RKSimon git clang-format doesn't report any formatting errors locally. Do you want me to manually apply the formatting patch suggested by the github-actions bot?

@RKSimon RKSimon self-requested a review September 4, 2025 12:12
@RKSimon
Copy link
Collaborator

RKSimon commented Sep 4, 2025

@RKSimon git clang-format doesn't report any formatting errors locally. Do you want me to manually apply the formatting patch suggested by the github-actions bot?

No I don't think those are necessary changes tbh.

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - cheers

@RKSimon RKSimon enabled auto-merge (squash) September 4, 2025 12:23
@RKSimon RKSimon merged commit 8bdd909 into llvm:main Sep 4, 2025
8 of 9 checks passed
@moorabbit moorabbit deleted the constexpr-avx512-intrinsics-part-2 branch September 4, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants