about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/std_example.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-05-25 18:51:16 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-05-25 18:51:16 +0000
commit3816385b09db445ab580043ed45218df8c1198ad (patch)
tree72c83caba4898e2393bf300c084aac0abb363271 /compiler/rustc_codegen_cranelift/example/std_example.rs
parent283db70ace62a0ae704a624e43b68c2ee44b87a6 (diff)
parent979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785 (diff)
downloadrust-3816385b09db445ab580043ed45218df8c1198ad.tar.gz
rust-3816385b09db445ab580043ed45218df8c1198ad.zip
Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into sync_cg_clif-2025-05-25
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/example/std_example.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs
index 2d9de2a5b8d..5d83066cffb 100644
--- a/compiler/rustc_codegen_cranelift/example/std_example.rs
+++ b/compiler/rustc_codegen_cranelift/example/std_example.rs
@@ -166,6 +166,7 @@ fn main() {
         enum Never {}
     }
 
+    #[cfg(not(target_arch = "s390x"))] // s390x doesn't have vector instructions enabled by default
     foo(I64X2([0, 0]));
 
     transmute_wide_pointer();
@@ -203,9 +204,11 @@ fn rust_call_abi() {
     rust_call_abi_callee((1, 2));
 }
 
+#[cfg_attr(target_arch = "s390x", allow(dead_code))]
 #[repr(simd)]
 struct I64X2([i64; 2]);
 
+#[cfg_attr(target_arch = "s390x", allow(dead_code))]
 #[allow(improper_ctypes_definitions)]
 extern "C" fn foo(_a: I64X2) {}