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
This commit is contained in:
Stuart Cook 2025-05-04 13:21:07 +10:00 committed by GitHub
commit ed7590f1a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 48 additions and 1 deletions

View file

@ -5,7 +5,7 @@
//@ no-auto-check-cfg
//@ compile-flags: --check-cfg=cfg()
//@ normalize-stderr: "and \d+ more" -> "and X more"
//@ normalize-stderr: "`[a-zA-Z0-9_-]+`" -> "`xxx`"
//@ normalize-stderr: "`[a-zA-Z0-9_\.-]+`" -> "`xxx`"
fn main() {
cfg!(target_feature = "zebra");

View file

@ -29,6 +29,8 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
`amx-transpose`
`atomics`
`avx`
`avx10.1`
`avx10.2`
`avx2`
`avx512bf16`
`avx512bitalg`

View file

@ -0,0 +1,6 @@
//@ only-x86_64
#[target_feature(enable = "avx10.1")]
//~^ ERROR: currently unstable
unsafe fn foo() {}
fn main() {}

View file

@ -0,0 +1,13 @@
error[E0658]: the target feature `avx10.1` is currently unstable
--> $DIR/feature-gate-avx10_target_feature.rs:2:18
|
LL | #[target_feature(enable = "avx10.1")]
| ^^^^^^^^^^^^^^^^^^
|
= note: see issue #138843 <https://github.com/rust-lang/rust/issues/138843> for more information
= help: add `#![feature(avx10_target_feature)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.