More x86 const generics conversions#1047
Merged
Amanieu merged 73 commits intorust-lang:masterfrom Mar 5, 2021
Merged
Conversation
|
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
481c587 to
47ddf88
Compare
29df0de to
050d981
Compare
Member
Author
|
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 ? |
Member
|
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
Member
Author
|
CI passes so I created #1048 to track re-enabling the WASM builder after this PR lands |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR converts the following intrinsics to use const generics:
x86/aes.rs: (which I believe completes this file)
_mm_aeskeygenassist_si128x86_64/sse41.rs: (which I believe completes this file)
_mm_extract_epi64_mm_insert_epi64x86_64/avx2.rs: (which I believe completes this file)
_mm256_extract_epi64x86/sha.rs: (which I believe completes this file)
_mm_sha1rnds4_epu32x86/pclmulqdq.rs: (which I believe completes this file)
_mm_clmulepi64_si128most 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_epi8There 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_genericsrefuses 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)