Update the MIRI tests
This commit is contained in:
parent
24c505070c
commit
51d0f68b78
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(1, 1);
|
let x = i32x2([1, 1]);
|
||||||
let y = i32x2(1, 0);
|
let y = i32x2([1, 0]);
|
||||||
simd_div(x, y); //~ERROR: Undefined Behavior: dividing by zero
|
simd_div(x, y); //~ERROR: Undefined Behavior: dividing by zero
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(1, i32::MIN);
|
let x = i32x2([1, i32::MIN]);
|
||||||
let y = i32x2(1, -1);
|
let y = i32x2([1, -1]);
|
||||||
simd_div(x, y); //~ERROR: Undefined Behavior: overflow in signed division
|
simd_div(x, y); //~ERROR: Undefined Behavior: overflow in signed division
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(0, 1);
|
let x = i32x2([0, 1]);
|
||||||
simd_reduce_any(x); //~ERROR: must be all-0-bits or all-1-bits
|
simd_reduce_any(x); //~ERROR: must be all-0-bits or all-1-bits
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(1, 1);
|
let x = i32x2([1, 1]);
|
||||||
let y = i32x2(1, 0);
|
let y = i32x2([1, 0]);
|
||||||
simd_rem(x, y); //~ERROR: Undefined Behavior: calculating the remainder with a divisor of zero
|
simd_rem(x, y); //~ERROR: Undefined Behavior: calculating the remainder with a divisor of zero
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(0, 1);
|
let x = i32x2([0, 1]);
|
||||||
simd_select_bitmask(0b11111111u8, x, x); //~ERROR: bitmask less than 8 bits long must be filled with 0s for the remaining bits
|
simd_select_bitmask(0b11111111u8, x, x); //~ERROR: bitmask less than 8 bits long must be filled with 0s for the remaining bits
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(0, 1);
|
let x = i32x2([0, 1]);
|
||||||
simd_select(x, x, x); //~ERROR: must be all-0-bits or all-1-bits
|
simd_select(x, x, x); //~ERROR: must be all-0-bits or all-1-bits
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(1, 1);
|
let x = i32x2([1, 1]);
|
||||||
let y = i32x2(100, 0);
|
let y = i32x2([100, 0]);
|
||||||
simd_shl(x, y); //~ERROR: overflowing shift by 100 in `simd_shl` in lane 0
|
simd_shl(x, y); //~ERROR: overflowing shift by 100 in `simd_shl` in lane 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let x = i32x2(1, 1);
|
let x = i32x2([1, 1]);
|
||||||
let y = i32x2(20, 40);
|
let y = i32x2([20, 40]);
|
||||||
simd_shr(x, y); //~ERROR: overflowing shift by 40 in `simd_shr` in lane 1
|
simd_shr(x, y); //~ERROR: overflowing shift by 40 in `simd_shr` in lane 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,22 +3,22 @@
|
|||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x2(i32, i32);
|
struct i32x2([i32; 2]);
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x4(i32, i32, i32, i32);
|
struct i32x4([i32; 4]);
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct i32x8(i32, i32, i32, i32, i32, i32, i32, i32);
|
struct i32x8([i32; 8]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _x2 = i32x2(20, 21);
|
let _x2 = i32x2([20, 21]);
|
||||||
let _x4 = i32x4(40, 41, 42, 43);
|
let _x4 = i32x4([40, 41, 42, 43]);
|
||||||
let _x8 = i32x8(80, 81, 82, 83, 84, 85, 86, 87);
|
let _x8 = i32x8([80, 81, 82, 83, 84, 85, 86, 87]);
|
||||||
|
|
||||||
let _y2 = i32x2(120, 121);
|
let _y2 = i32x2([120, 121]);
|
||||||
let _y4 = i32x4(140, 141, 142, 143);
|
let _y4 = i32x4([140, 141, 142, 143]);
|
||||||
let _y8 = i32x8(180, 181, 182, 183, 184, 185, 186, 187);
|
let _y8 = i32x8([180, 181, 182, 183, 184, 185, 186, 187]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user