Add the new amx target features

This commit is contained in:
sayantn 2025-03-04 20:07:25 +05:30
parent f9e0239a7b
commit 0ec1d460bb
3 changed files with 16 additions and 0 deletions

View file

@ -298,6 +298,12 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
("sparc", "v8plus") if get_version().0 == 19 => Some(LLVMFeature::new("v9")),
("sparc", "v8plus") if get_version().0 < 19 => None,
("powerpc", "power8-crypto") => Some(LLVMFeature::new("crypto")),
// These new `amx` variants and `movrs` were introduced in LLVM20
("x86", "amx-avx512" | "amx-fp8" | "amx-movrs" | "amx-tf32" | "amx-transpose")
if get_version().0 < 20 =>
{
None
}
(_, s) => Some(LLVMFeature::new(s)),
}
}

View file

@ -380,11 +380,16 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
// tidy-alphabetical-start
("adx", Stable, &[]),
("aes", Stable, &["sse2"]),
("amx-avx512", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-bf16", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-complex", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-fp16", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-fp8", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-int8", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-movrs", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-tf32", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("amx-tile", Unstable(sym::x86_amx_intrinsics), &[]),
("amx-transpose", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
("avx", Stable, &["sse4.2"]),
("avx2", Stable, &["avx"]),
("avx512bf16", Unstable(sym::avx512_target_feature), &["avx512bw"]),

View file

@ -17,11 +17,16 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
`aes`
`altivec`
`alu32`
`amx-avx512`
`amx-bf16`
`amx-complex`
`amx-fp16`
`amx-fp8`
`amx-int8`
`amx-movrs`
`amx-tf32`
`amx-tile`
`amx-transpose`
`atomics`
`avx`
`avx2`