about summary refs log tree commit diff
path: root/tests/ui/simd/monomorphize-shuffle-index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/simd/monomorphize-shuffle-index.rs')
-rw-r--r--tests/ui/simd/monomorphize-shuffle-index.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/simd/monomorphize-shuffle-index.rs b/tests/ui/simd/monomorphize-shuffle-index.rs
index a56f2ea1452..1490f8e2319 100644
--- a/tests/ui/simd/monomorphize-shuffle-index.rs
+++ b/tests/ui/simd/monomorphize-shuffle-index.rs
@@ -11,6 +11,10 @@
 )]
 #![allow(incomplete_features)]
 
+#[path = "../../auxiliary/minisimd.rs"]
+mod minisimd;
+use minisimd::*;
+
 #[cfg(old)]
 use std::intrinsics::simd::simd_shuffle;
 
@@ -18,10 +22,6 @@ use std::intrinsics::simd::simd_shuffle;
 #[rustc_intrinsic]
 unsafe fn simd_shuffle_const_generic<T, U, const I: &'static [u32]>(a: T, b: T) -> U;
 
-#[derive(Copy, Clone)]
-#[repr(simd)]
-struct Simd<T, const N: usize>([T; N]);
-
 trait Shuffle<const N: usize> {
     const I: Simd<u32, N>;
     const J: &'static [u32] = &Self::I.0;
@@ -57,9 +57,9 @@ fn main() {
     let b = Simd::<u8, 4>([4, 5, 6, 7]);
     unsafe {
         let x: Simd<u8, 4> = I1.shuffle(a, b);
-        assert_eq!(x.0, [0, 2, 4, 6]);
+        assert_eq!(x.into_array(), [0, 2, 4, 6]);
 
         let y: Simd<u8, 2> = I2.shuffle(a, b);
-        assert_eq!(y.0, [1, 5]);
+        assert_eq!(y.into_array(), [1, 5]);
     }
 }