-
Notifications
You must be signed in to change notification settings - Fork 269
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
More x86 const generics conversions #1047
More x86 const generics conversions #1047
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
481c587
to
47ddf88
Compare
29df0de
to
050d981
Compare
Something seems to be going wrong with the CI on the wasm32-wasi target 🤔 I tried bisecting using the CI, but it seems to fail all the time regardless of the commits I include, and the failure seems strange
does that sound familiar to anyone ? |
This is probably because of the upgrade to LLVM 12 (rust-lang/rust#81451). Just disable wasm CI for now and create an issue. |
The LLVM12 upgrade in rustc may be causing issues
CI passes so I created #1048 to track re-enabling the WASM builder after this PR lands |
This PR converts the following intrinsics to use const generics:
x86/aes.rs: (which I believe completes this file)
_mm_aeskeygenassist_si128
x86_64/sse41.rs: (which I believe completes this file)
_mm_extract_epi64
_mm_insert_epi64
x86_64/avx2.rs: (which I believe completes this file)
_mm256_extract_epi64
x86/sha.rs: (which I believe completes this file)
_mm_sha1rnds4_epu32
x86/pclmulqdq.rs: (which I believe completes this file)
_mm_clmulepi64_si128
most of x86/avx512bw.rs:
_mm512_cmp_epu16_mask
_mm512_mask_cmp_epu16_mask
_mm256_cmp_epu16_mask
_mm256_mask_cmp_epu16_mask
_mm_cmp_epu16_mask
_mm_mask_cmp_epu16_mask
_mm512_cmp_epu8_mask
_mm512_mask_cmp_epu8_mask
_mm256_cmp_epu8_mask
_mm256_mask_cmp_epu8_mask
_mm_cmp_epu8_mask
_mm_mask_cmp_epu8_mask
_mm512_cmp_epi16_mask
_mm512_mask_cmp_epi16_mask
_mm256_cmp_epi16_mask
_mm256_mask_cmp_epi16_mask
_mm_cmp_epi16_mask
_mm_mask_cmp_epi16_mask
_mm512_cmp_epi8_mask
_mm512_mask_cmp_epi8_mask
_mm256_cmp_epi8_mask
_mm256_mask_cmp_epi8_mask
_mm_cmp_epi8_mask
_mm_mask_cmp_epi8_mask
_mm512_slli_epi16
_mm512_mask_slli_epi16
_mm512_maskz_slli_epi16
_mm_maskz_slli_epi16
_mm512_srli_epi16
_mm512_mask_srli_epi16
_mm512_maskz_srli_epi16
_mm256_mask_srli_epi16
_mm256_maskz_srli_epi16
_mm_mask_srli_epi16
_mm_maskz_srli_epi16
_mm512_srai_epi16
_mm512_mask_srai_epi16
_mm512_maskz_srai_epi16
_mm512_mask_shufflelo_epi16
_mm512_maskz_shufflelo_epi16
_mm256_mask_shufflelo_epi16
_mm256_maskz_shufflelo_epi16
_mm_mask_shufflelo_epi16
_mm_maskz_shufflelo_epi16
_mm512_mask_shufflehi_epi16
_mm512_maskz_shufflehi_epi16
_mm256_mask_shufflehi_epi16
_mm256_maskz_shufflehi_epi16
_mm_mask_shufflehi_epi16
_mm_maskz_shufflehi_epi16
_mm512_dbsad_epu8
_mm512_mask_dbsad_epu8
_mm512_maskz_dbsad_epu8
_mm256_dbsad_epu8
_mm256_mask_dbsad_epu8
_mm256_maskz_dbsad_epu8
_mm_dbsad_epu8
_mm_mask_dbsad_epu8
_mm_maskz_dbsad_epu8
_mm512_mask_alignr_epi8
_mm512_maskz_alignr_epi8
_mm256_mask_alignr_epi8
_mm256_maskz_alignr_epi8
_mm_mask_alignr_epi8
_mm_maskz_alignr_epi8
There are some interesting cases in this file, where some immediates are u32s while elsewhere most of them are i32s. Not a big deal unless one of those intrinsics calls the others: we can't easily cast between the 2 types, even (to the extent of my abilities) via the associated const trick to cast.
min_const_generics
refuses to compile such a naive trick constant in this position (and we cannot naively use either these immediates in the const expressions casts with{}
). (There are around 10 cases like this in this file).x86/rtm.rs: (which I believe completes this file)
_xabort
(it may be wishful thinking on my part, but while working on these conversions the past few days, it felt like incremental check builds are slowly but surely getting faster)