about summary refs log tree commit diff
path: root/src/test/ui/simd
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/simd')
-rw-r--r--src/test/ui/simd/simd-intrinsic-generic-elements.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/test/ui/simd/simd-intrinsic-generic-elements.rs b/src/test/ui/simd/simd-intrinsic-generic-elements.rs
index a85ec7c5823..08544bce45d 100644
--- a/src/test/ui/simd/simd-intrinsic-generic-elements.rs
+++ b/src/test/ui/simd/simd-intrinsic-generic-elements.rs
@@ -2,6 +2,8 @@
 // ignore-emscripten FIXME(#45351) hits an LLVM assert
 
 #![feature(repr_simd, platform_intrinsics)]
+#![allow(incomplete_features)]
+#![feature(inline_const)]
 
 #[repr(simd)]
 #[derive(Copy, Clone, Debug, PartialEq)]
@@ -82,19 +84,19 @@ fn main() {
     let y4 = i32x4(140, 141, 142, 143);
     let y8 = i32x8(180, 181, 182, 183, 184, 185, 186, 187);
     unsafe {
-        all_eq!(simd_shuffle2(x2, y2, [3, 0]), i32x2(121, 20));
-        all_eq!(simd_shuffle4(x2, y2, [3, 0, 1, 2]), i32x4(121, 20, 21, 120));
-        all_eq!(simd_shuffle8(x2, y2, [3, 0, 1, 2, 1, 2, 3, 0]),
+        all_eq!(simd_shuffle2(x2, y2, const { [3u32, 0] }), i32x2(121, 20));
+        all_eq!(simd_shuffle4(x2, y2, const { [3u32, 0, 1, 2] }), i32x4(121, 20, 21, 120));
+        all_eq!(simd_shuffle8(x2, y2, const { [3u32, 0, 1, 2, 1, 2, 3, 0] }),
                 i32x8(121, 20, 21, 120, 21, 120, 121, 20));
 
-        all_eq!(simd_shuffle2(x4, y4, [7, 2]), i32x2(143, 42));
-        all_eq!(simd_shuffle4(x4, y4, [7, 2, 5, 0]), i32x4(143, 42, 141, 40));
-        all_eq!(simd_shuffle8(x4, y4, [7, 2, 5, 0, 3, 6, 4, 1]),
+        all_eq!(simd_shuffle2(x4, y4, const { [7u32, 2] }), i32x2(143, 42));
+        all_eq!(simd_shuffle4(x4, y4, const { [7u32, 2, 5, 0] }), i32x4(143, 42, 141, 40));
+        all_eq!(simd_shuffle8(x4, y4, const { [7u32, 2, 5, 0, 3, 6, 4, 1] }),
                 i32x8(143, 42, 141, 40, 43, 142, 140, 41));
 
-        all_eq!(simd_shuffle2(x8, y8, [11, 5]), i32x2(183, 85));
-        all_eq!(simd_shuffle4(x8, y8, [11, 5, 15, 0]), i32x4(183, 85, 187, 80));
-        all_eq!(simd_shuffle8(x8, y8, [11, 5, 15, 0, 3, 8, 12, 1]),
+        all_eq!(simd_shuffle2(x8, y8, const { [11u32, 5] }), i32x2(183, 85));
+        all_eq!(simd_shuffle4(x8, y8, const { [11u32, 5, 15, 0] }), i32x4(183, 85, 187, 80));
+        all_eq!(simd_shuffle8(x8, y8, const { [11u32, 5, 15, 0, 3, 8, 12, 1] }),
                 i32x8(183, 85, 187, 80, 83, 180, 184, 81));
     }