about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-05 09:25:50 +0000
committerbors <bors@rust-lang.org>2024-08-05 09:25:50 +0000
commit9179d9b334e3f5e8772e1a563308dc95a1cde960 (patch)
tree11366ba48f6b11c94fcc1d9f875a5bcbaef50a35 /compiler/rustc_codegen_ssa/src
parent4d48a6be74d46304cacb93cb8eb60d70d733b862 (diff)
parent80b74d397fffc9deaafd2b44552ba3a9107b4d5b (diff)
downloadrust-9179d9b334e3f5e8772e1a563308dc95a1cde960.tar.gz
rust-9179d9b334e3f5e8772e1a563308dc95a1cde960.zip
Auto merge of #117468 - daxpedda:wasm-relaxed-simd, r=alexcrichton
Stabilize Wasm relaxed SIMD

This PR stabilizes [Wasm relaxed SIMD](https://github.com/WebAssembly/relaxed-simd) which has already reached [phase 4](https://github.com/WebAssembly/proposals/tree/04fa8c810e1dc99ab399e41052a6e427ee988180?tab=readme-ov-file#phase-4---standardize-the-feature-wg).

Tracking issue: #111196
Implementation PR: https://github.com/rust-lang/stdarch/pull/1393
Documentation: https://github.com/rust-lang/reference/pull/1421
Stdarch: https://github.com/rust-lang/stdarch/pull/1494

Closes #111196.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/target_features.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs
index b52e6259944..127244a34f8 100644
--- a/compiler/rustc_codegen_ssa/src/target_features.rs
+++ b/compiler/rustc_codegen_ssa/src/target_features.rs
@@ -97,6 +97,14 @@ pub fn from_target_feature(
             Some(Symbol::intern(feature))
         }));
     }
+
+    for (feature, requires) in tcx.sess.target.implicit_target_features() {
+        if target_features.iter().any(|f| f.as_str() == *feature)
+            && !target_features.iter().any(|f| f.as_str() == *requires)
+        {
+            target_features.push(Symbol::intern(requires));
+        }
+    }
 }
 
 /// Computes the set of target features used in a function for the purposes of