diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-04-02 23:35:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-02 23:35:57 +0800 |
| commit | ead4d4c9514962bbec4ca22e561bad70a76242f4 (patch) | |
| tree | 8345c298b9e6a34f3f0d1064ba09042d67a6fc5c /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 9f8e25f922c36debc770de37b7baee895c8adcb8 (diff) | |
| parent | cae5d8a81c6c5ce58909fdf1ee5679779a0b94fc (diff) | |
| download | rust-ead4d4c9514962bbec4ca22e561bad70a76242f4.tar.gz rust-ead4d4c9514962bbec4ca22e561bad70a76242f4.zip | |
Merge pull request #2313 from jieyouxu/rustc-pull
Rustc pull
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)), } } |
