2020-02-21 00:00:39 +00:00
|
|
|
#![feature(repr_simd, platform_intrinsics)]
|
2019-06-19 13:58:51 +00:00
|
|
|
|
|
|
|
// revisions:rpass1 rpass2
|
|
|
|
|
|
|
|
#[repr(simd)]
|
|
|
|
struct I32x2(i32, i32);
|
|
|
|
|
|
|
|
extern "platform-intrinsic" {
|
2023-07-10 13:03:48 +00:00
|
|
|
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
2019-06-19 13:58:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
2021-05-12 15:08:45 +00:00
|
|
|
const IDX: [u32; 2] = [0, 0];
|
2023-07-10 13:03:48 +00:00
|
|
|
let _: I32x2 = simd_shuffle(I32x2(1, 2), I32x2(3, 4), IDX);
|
|
|
|
let _: I32x2 = simd_shuffle(I32x2(1, 2), I32x2(3, 4), IDX);
|
2019-06-19 13:58:51 +00:00
|
|
|
}
|
|
|
|
}
|