2021-11-25 16:24:47 -06:00
|
|
|
#![feature(platform_intrinsics, repr_simd)]
|
|
|
|
|
|
|
|
extern "platform-intrinsic" {
|
|
|
|
pub(crate) fn simd_shr<T>(x: T, y: T) -> T;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(simd)]
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
struct i32x2(i32, i32);
|
|
|
|
|
2022-06-21 01:40:39 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let x = i32x2(1, 1);
|
|
|
|
let y = i32x2(20, 40);
|
|
|
|
simd_shr(x, y); //~ERROR overflowing shift by 40 in `simd_shr` in SIMD lane 1
|
|
|
|
}
|
|
|
|
}
|