2022-03-16 19:52:01 -05:00
|
|
|
#![feature(platform_intrinsics, repr_simd)]
|
|
|
|
|
|
|
|
extern "platform-intrinsic" {
|
|
|
|
fn simd_select_bitmask<M, T>(m: M, yes: T, no: T) -> T;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(simd)]
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
#[derive(Copy, Clone)]
|
|
|
|
struct i32x2(i32, i32);
|
|
|
|
|
2022-06-21 01:40:39 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let x = i32x2(0, 1);
|
2022-07-11 06:44:55 -05:00
|
|
|
simd_select_bitmask(0b11111111u8, x, x); //~ERROR: bitmask less than 8 bits long must be filled with 0s for the remaining bits
|
2022-06-21 01:40:39 -05:00
|
|
|
}
|
|
|
|
}
|