-
Notifications
You must be signed in to change notification settings - Fork 275
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
VAES should not be restricted to AVX512 #1343
Comments
My CPU info:
Both code run without problem despite the unsatisfactory code generation. |
Amanieu
added a commit
to Amanieu/stdarch
that referenced
this issue
Oct 27, 2022
These are available on AMD CPUs without AVX512, Fixes rust-lang#1343
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stdarch/crates/core_arch/src/x86/avx512vaes.rs
Line 65 in 790411f
It seems that the
stdarch
library unconditionally putVAES
related intrinsics into theAVX512VL
scope whileVAES
is actually available on platforms without AVX512 support (AMD Zen3).I spot the issue when I was investigating VAES with ahash: tkaitchuck/aHash#85
When using
_mm256_aesenc_epi128
, instead of generating something likethe compiler generates
It is very strange that the compiler do not inline the function call under release profile even if
target-cpu=native
is set.However, when I explicit write
The compiler will give the upper asm as expected.
I suspect that this is because of the intrinsic being marked as
avx512vl
instruction.The text was updated successfully, but these errors were encountered: