Skip to content

some Avx512f to const generics #1064

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

Merged
merged 13 commits into from
Mar 9, 2021
Merged

some Avx512f to const generics #1064

merged 13 commits into from
Mar 9, 2021

Conversation

minybot
Copy link
Contributor

@minybot minybot commented Mar 8, 2021

256_mask_slli_epi32,epi64; mm_mask_slli_epi32,epi64
256_mask_slli_epi32,epi64; mm_mask_slli_epi32,epi64
Inserti32x4,f32x4,i64x4,f64x4
extract_f32x4_ps,f64x4_pd

mm256_alignr_epi8
mm512_alignr_epi8
bslli_epi128; bsrli_epi128
mm512_shufflehi_epi16, mm512_shufflelo_epi16

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@minybot
Copy link
Contributor Author

minybot commented Mar 8, 2021

Avx512f only has 2 (extract_i32x4,i64x4) left which are not converted to const generics.
Because avx512vpclmulqdq test uses unroll macro which cannot parse extracti32x4<constant>(xxx) correctly.

match imm8 & 0x3 {
#[rustc_legacy_const_generics(1)]
pub unsafe fn _mm512_extractf32x4_ps<const IMM8: i32>(a: __m512) -> __m128 {
static_assert_imm8!(IMM8);
Copy link
Member

Choose a reason for hiding this comment

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

This should be using static_assert_imm2. Same with the other extract/insert below. This matches the behavior in Clang.

Copy link
Member

Choose a reason for hiding this comment

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

(it's also what's documented in the intel intrinsics guide)

@lqd
Copy link
Member

lqd commented Mar 8, 2021

Because avx512vpclmulqdq test uses unroll macro which cannot parse extracti32x4(xxx) correctly.

I'll take care of that as soon as this PR lands

} else {
shift + i
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This function isn't actually used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I was thinking how to do for mm256_alignr_epi8. I remove it now

@Amanieu Amanieu merged commit d9ee7a4 into rust-lang:master Mar 9, 2021
@minybot minybot deleted the avx512f branch March 9, 2021 00:58
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.

4 participants