2 #![feature(repr_simd, platform_intrinsics)]
4 extern "platform-intrinsic" {
5 fn simd_cast<T, U>(x: T) -> U;
13 let u = V::<usize>([0, 1, 2, 3]);
14 let uu32: V<u32> = unsafe { simd_cast(u) };
15 let ui64: V<i64> = unsafe { simd_cast(u) };
17 for (u, (uu32, ui64)) in u.0.iter().zip(uu32.0.iter().zip(ui64.0.iter())) {
18 assert_eq!(*u as u32, *uu32);
19 assert_eq!(*u as i64, *ui64);