Don't use evex512 with LLVM 22

As Intel has walked back on the existence of AVX 10.1-256, LLVM
no longer uses evex512 and avx-10.n-512 are now avx-10.n instead,
so we can skip all the special handling on LLVM 22.
This commit is contained in:
Nikita Popov 2026-01-09 14:56:11 +01:00
parent 0be66603ac
commit 08da3685ed

View file

@ -287,12 +287,12 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
"cmpxchg16b" => Some(LLVMFeature::new("cx16")),
"lahfsahf" => Some(LLVMFeature::new("sahf")),
// Enable the evex512 target feature if an avx512 target feature is enabled.
s if s.starts_with("avx512") => Some(LLVMFeature::with_dependencies(
s if s.starts_with("avx512") && major < 22 => Some(LLVMFeature::with_dependencies(
s,
smallvec![TargetFeatureFoldStrength::EnableOnly("evex512")],
)),
"avx10.1" => Some(LLVMFeature::new("avx10.1-512")),
"avx10.2" => Some(LLVMFeature::new("avx10.2-512")),
"avx10.1" if major < 22 => Some(LLVMFeature::new("avx10.1-512")),
"avx10.2" if major < 22 => Some(LLVMFeature::new("avx10.2-512")),
"apxf" => Some(LLVMFeature::with_dependencies(
"egpr",
smallvec![