about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorsayantn <sayantn05@gmail.com>2025-03-04 20:07:25 +0530
committersayantn <sayantn05@gmail.com>2025-03-05 05:34:37 +0530
commit0ec1d460bb898a22de37bcc040f86449371bdbdb (patch)
tree07055bdc6d3f18db8a8602967b9fcbf2c0426d1c /compiler/rustc_codegen_llvm/src
parentf9e0239a7bc813b4aceffc7f069f4797cde3175c (diff)
downloadrust-0ec1d460bb898a22de37bcc040f86449371bdbdb.tar.gz
rust-0ec1d460bb898a22de37bcc040f86449371bdbdb.zip
Add the new `amx` target features
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index 5cc4f4ab9e6..e3e2e8f2c0b 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -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)),
     }
 }