-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Headers][X86] Add constexpr support for some AVX512 masked extension/truncation intrinsics. #158663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Headers][X86] Add constexpr support for some AVX512 masked extension/truncation intrinsics. #158663
Conversation
|
@RKSimon these functions: llvm-project/clang/lib/Headers/avx512vlbwintrin.h Lines 1447 to 1459 in f5d3cf4
Can't be made constexpr because __builtin_ia32_pmovwb128_mask is not constexpr.
Is there a plan to remove llvm-project/clang/lib/Headers/avx512vlbwintrin.h Lines 1485 to 1490 in f5d3cf4
|
|
At the moment we need to keep _mm_mask_cvtepi16_epi8 etc as the selection mask only acts on part of the vector (we're truncating v8i16 to v8i8, using the mask8 on that and passing through all the upper half of the passthrough to create a v16i8) - the best we might be able to do is a custom __builtin_ia32_selectb_64 but it'll be messy - we'll have to come back to it later, maybe when the _mm512_kunpack intrinsics are constexpr? |
RKSimon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - cheers
The following AVX[512] intrinsics are now constexpr:
_mm512_mask_cvtepi8_epi32_mm512_maskz_cvtepi8_epi32_mm512_mask_cvtepi8_epi64_mm512_maskz_cvtepi8_epi64_mm512_mask_cvtepi16_epi32_mm512_maskz_cvtepi16_epi32_mm512_mask_cvtepi16_epi64_mm512_maskz_cvtepi16_epi64_mm512_mask_cvtepi32_epi64_mm512_maskz_cvtepi32_epi64_mm512_mask_cvtepu8_epi32_mm512_maskz_cvtepu8_epi32_mm512_mask_cvtepu8_epi64_mm512_maskz_cvtepu8_epi64_mm512_mask_cvtepu16_epi32_mm512_maskz_cvtepu16_epi32_mm512_mask_cvtepu16_epi64_mm512_maskz_cvtepu16_epi64_mm512_mask_cvtepu32_epi64_mm512_maskz_cvtepu32_epi64_mm512_mask_cvtepi8_epi16_mm512_maskz_cvtepi8_epi16_mm512_mask_cvtepu8_epi16_mm512_maskz_cvtepu8_epi16_mm_cvtepi16_epi8_mm256_cvtepi16_epi8_mm256_mask_cvtepi16_epi8_mm256_maskz_cvtepi16_epi8This PR is part 1 of a series of PRs fixing #154539