about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-05-04 13:21:07 +1000
committerGitHub <noreply@github.com>2025-05-04 13:21:07 +1000
commited7590f1a0932341f938e34bfb69c72bbc255fcf (patch)
treef01e6e0e835016878f752e1c3cff7a6a6704346d /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent3559e0ab0e370b98bc3f9e6b688152c47eb9e6c8 (diff)
parent163fb854a2346a26ade9e09ec13ef10a3145ee25 (diff)
downloadrust-ed7590f1a0932341f938e34bfb69c72bbc255fcf.tar.gz
rust-ed7590f1a0932341f938e34bfb69c72bbc255fcf.zip
Rollup merge of #139675 - sayantn:avx10, r=Amanieu
Add the AVX10 target features

Parent #138843

Adds the `avx10_target_feature` feature gate, and `avx10.1` and `avx10.2` target features.

It is confirmed that Intel is dropping AVX10/256 (see [this comment](https://github.com/rust-lang/rust/issues/111137#issuecomment-2795442288)), so this should be safe to implement now.

The LLVM fix for llvm/llvm-project#135394 was merged, and has been backported to LLVM20, and the patch has also been propagated to rustc in #140502

`@rustbot` label O-x86_64 O-x86_32 A-target-feature A-SIMD
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index 507cbf20d89..264510285a5 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -301,6 +301,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
             None
         }
         ("x86", "movrs") if get_version().0 < 20 => None,
+        ("x86", "avx10.1") => Some(LLVMFeature::new("avx10.1-512")),
+        ("x86", "avx10.2") if get_version().0 < 20 => None,
+        ("x86", "avx10.2") if get_version().0 >= 20 => Some(LLVMFeature::new("avx10.2-512")),
         (_, s) => Some(LLVMFeature::new(s)),
     }
 }