about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-24 08:12:58 +0200
committerGitHub <noreply@github.com>2025-04-24 08:12:58 +0200
commit32b2428c8b6c7f9c163c313db9826ebf0d08ea6d (patch)
tree17cbbbf2524a035a4d51271dbf4fe6c19128661c /compiler/rustc_monomorphize/src
parent10732e14f4ee6e462170f883c79fb90acf3ddc2c (diff)
parent19e44d463bf671f6ec1b02b32837ad54dd5d626f (diff)
downloadrust-32b2428c8b6c7f9c163c313db9826ebf0d08ea6d.tar.gz
rust-32b2428c8b6c7f9c163c313db9826ebf0d08ea6d.zip
Rollup merge of #139809 - alexcrichton:wasm-simd-safe, r=RalfJung
Don't warn about `v128` in wasm ABI transition

The `-Zwasm-c-abi=spec` mode of `extern "C"` does not actually change the meaning of `v128`  meaning that the FCW lint firing is a false positive.

cc https://github.com/rust-lang/rust/issues/138762#issuecomment-2801709483
Diffstat (limited to 'compiler/rustc_monomorphize/src')
-rw-r--r--compiler/rustc_monomorphize/src/mono_checks/abi_check.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs b/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
index 2ef23d7a21d..cfeaee07776 100644
--- a/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
+++ b/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
@@ -89,6 +89,12 @@ fn wasm_abi_safe<'tcx>(tcx: TyCtxt<'tcx>, arg: &ArgAbi<'tcx, Ty<'tcx>>) -> bool
         return true;
     }
 
+    // Both the old and the new ABIs treat vector types like `v128` the same
+    // way.
+    if uses_vector_registers(&arg.mode, &arg.layout.backend_repr) {
+        return true;
+    }
+
     // This matches `unwrap_trivial_aggregate` in the wasm ABI logic.
     if arg.layout.is_aggregate() {
         let cx = LayoutCx::new(tcx, TypingEnv::fully_monomorphized());