diff options
| author | Ralf Jung <post@ralfj.de> | 2025-04-02 23:54:22 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-04-02 23:54:22 +0200 |
| commit | e435ba32d85057070dba3f07fa8afd96799a0cfb (patch) | |
| tree | c989d04f4bcd32bcd93ed62208af68e1dbe36b6d /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | a3af09faa39d5a8d303a4cc2f80182e0f01baa7c (diff) | |
| parent | 64b58dd13b06a23d8429a73c225347b4cd3b2c3c (diff) | |
| download | rust-e435ba32d85057070dba3f07fa8afd96799a0cfb.tar.gz rust-e435ba32d85057070dba3f07fa8afd96799a0cfb.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 4a166b0872d..4e85286ed55 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -274,7 +274,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea ("arm", "fp16") => Some(LLVMFeature::new("fullfp16")), // In LLVM 18, `unaligned-scalar-mem` was merged with `unaligned-vector-mem` into a single // feature called `fast-unaligned-access`. In LLVM 19, it was split back out. - ("riscv32" | "riscv64", "unaligned-scalar-mem") if get_version().0 == 18 => { + ("riscv32" | "riscv64", "unaligned-scalar-mem" | "unaligned-vector-mem") + if get_version().0 == 18 => + { Some(LLVMFeature::new("fast-unaligned-access")) } // Filter out features that are not supported by the current LLVM version @@ -298,6 +300,13 @@ 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 + } + ("x86", "movrs") if get_version().0 < 20 => None, (_, s) => Some(LLVMFeature::new(s)), } } |
