diff options
| author | daxpedda <daxpedda@gmail.com> | 2024-02-21 23:12:19 +0100 |
|---|---|---|
| committer | daxpedda <daxpedda@gmail.com> | 2024-08-04 08:44:13 +0200 |
| commit | 90521399b4bfa889916cb62e2394b69f295e22cf (patch) | |
| tree | 0c28d37a6e7dab41a55ba6f5ff6c925aa8178820 | |
| parent | b389b0ab72cb0aa9acf4df0ae0c0e12090782da9 (diff) | |
| download | rust-90521399b4bfa889916cb62e2394b69f295e22cf.tar.gz rust-90521399b4bfa889916cb62e2394b69f295e22cf.zip | |
Stabilize Wasm relaxed SIMD
| -rw-r--r-- | compiler/rustc_target/src/target_features.rs | 2 | ||||
| -rw-r--r-- | tests/ui/target-feature/wasm-relaxed-simd.rs | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index e52f2fc06df..843e28b17b0 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -333,7 +333,7 @@ const WASM_ALLOWED_FEATURES: &[(&str, Stability)] = &[ ("mutable-globals", Stable), ("nontrapping-fptoint", Stable), ("reference-types", Unstable(sym::wasm_target_feature)), - ("relaxed-simd", Unstable(sym::wasm_target_feature)), + ("relaxed-simd", Stable), ("sign-ext", Stable), ("simd128", Stable), // tidy-alphabetical-end diff --git a/tests/ui/target-feature/wasm-relaxed-simd.rs b/tests/ui/target-feature/wasm-relaxed-simd.rs new file mode 100644 index 00000000000..3c80647fdfe --- /dev/null +++ b/tests/ui/target-feature/wasm-relaxed-simd.rs @@ -0,0 +1,9 @@ +//@ only-wasm32-wasip1 +//@ compile-flags: -Ctarget-feature=+relaxed-simd,+simd128 --crate-type=lib +//@ build-pass + +use std::arch::wasm32::*; + +pub fn test(a: v128, b: v128, m: v128) -> v128 { + i64x2_relaxed_laneselect(a, b, m) +} |
