about summary refs log tree commit diff
path: root/tests/codegen/const-vector.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2025-04-27 18:53:00 +0900
committerGitHub <noreply@github.com>2025-04-27 18:53:00 +0900
commitd91ffb6da5c306150e53f73a361f69837bc39851 (patch)
treeee6518c803de044596ce0e095d38bd7cab0f4a57 /tests/codegen/const-vector.rs
parent89bb181106817c7828c16dc75ce5b2a367664471 (diff)
parent1b315ad92df192895fb2d1f0532270c54f6f8436 (diff)
downloadrust-d91ffb6da5c306150e53f73a361f69837bc39851.tar.gz
rust-d91ffb6da5c306150e53f73a361f69837bc39851.zip
Merge pull request #2351 from rust-lang/rustc-pull
Diffstat (limited to 'tests/codegen/const-vector.rs')
-rw-r--r--tests/codegen/const-vector.rs25
1 files changed, 4 insertions, 21 deletions
diff --git a/tests/codegen/const-vector.rs b/tests/codegen/const-vector.rs
index 8343594e5d2..1d4edc39b1c 100644
--- a/tests/codegen/const-vector.rs
+++ b/tests/codegen/const-vector.rs
@@ -8,6 +8,7 @@
 #![feature(repr_simd)]
 #![feature(rustc_attrs)]
 #![feature(simd_ffi)]
+#![feature(arm_target_feature)]
 #![allow(non_camel_case_types)]
 
 // Setting up structs that can be used as const vectors
@@ -28,33 +29,12 @@ pub struct Simd<T, const N: usize>([T; N]);
 
 extern "unadjusted" {
     fn test_i8x2(a: i8x2);
-}
-
-extern "unadjusted" {
     fn test_i8x2_two_args(a: i8x2, b: i8x2);
-}
-
-extern "unadjusted" {
     fn test_i8x2_mixed_args(a: i8x2, c: i32, b: i8x2);
-}
-
-extern "unadjusted" {
     fn test_i8x2_arr(a: i8x2);
-}
-
-extern "unadjusted" {
     fn test_f32x2(a: f32x2);
-}
-
-extern "unadjusted" {
     fn test_f32x2_arr(a: f32x2);
-}
-
-extern "unadjusted" {
     fn test_simd(a: Simd<i32, 4>);
-}
-
-extern "unadjusted" {
     fn test_simd_unaligned(a: Simd<i32, 3>);
 }
 
@@ -62,6 +42,9 @@ extern "unadjusted" {
 // if the size is not a power of 2
 // CHECK: %"Simd<i32, 3>" = type { [3 x i32] }
 
+#[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
+#[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
+#[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 pub fn do_call() {
     unsafe {
         // CHECK: call void @test_i8x2(<2 x i8> <i8 32, i8 64>