miri: Move patterns for simd tests
It isn't clear to me why these error patterns do not trigger, but I am not going to waste time analyzing bugs in compiletest.
This commit is contained in:
parent
4499daac77
commit
de858e7ea7
@ -1,9 +1,8 @@
|
||||
//@error-in-other-file: cannot be represented in target type `i32`
|
||||
#![feature(portable_simd)]
|
||||
use std::simd::*;
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked();
|
||||
let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked(); //~ERROR: cannot be represented in target type `i32`
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,13 @@
|
||||
error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 3.40282347E+38 which cannot be represented in target type `i32`
|
||||
--> RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
|
||||
--> $DIR/simd-float-to-int.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { intrinsics::simd_cast(self) }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 3.40282347E+38 which cannot be represented in target type `i32`
|
||||
LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 3.40282347E+38 which cannot be represented in target type `i32`
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::simd::Simd::<f32, 2>::to_int_unchecked::<i32>` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
|
||||
note: inside `main`
|
||||
--> $DIR/simd-float-to-int.rs:LL:CC
|
||||
|
|
||||
LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: inside `main` at $DIR/simd-float-to-int.rs:LL:CC
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@error-in-other-file: pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
#![feature(portable_simd)]
|
||||
use std::simd::*;
|
||||
|
||||
@ -6,6 +5,6 @@ fn main() {
|
||||
unsafe {
|
||||
let vec: &[i8] = &[10, 11, 12, 13, 14, 15, 16, 17, 18];
|
||||
let idxs = Simd::from_array([9, 3, 0, 17]);
|
||||
let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0));
|
||||
let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0)); //~ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,13 @@
|
||||
error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 9, so pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
--> RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
|
||||
--> $DIR/simd-gather.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { intrinsics::simd_gather(or, ptrs, enable.to_int()) }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 9, so pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
LL | let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 9, so pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::simd::Simd::<i8, 4>::gather_select_unchecked` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
|
||||
note: inside `main`
|
||||
--> $DIR/simd-gather.rs:LL:CC
|
||||
|
|
||||
LL | let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: inside `main` at $DIR/simd-gather.rs:LL:CC
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@error-in-other-file: pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
#![feature(portable_simd)]
|
||||
use std::simd::*;
|
||||
|
||||
@ -6,7 +5,7 @@ fn main() {
|
||||
unsafe {
|
||||
let mut vec: Vec<i8> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
|
||||
let idxs = Simd::from_array([9, 3, 0, 17]);
|
||||
Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(
|
||||
Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked( //~ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
&mut vec,
|
||||
Mask::splat(true),
|
||||
idxs,
|
||||
|
@ -1,14 +1,4 @@
|
||||
error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 9, so pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
--> RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
|
||||
|
|
||||
LL | intrinsics::simd_scatter(self, ptrs, enable.to_int())
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 9, so pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::simd::Simd::<i8, 4>::scatter_select_unchecked` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
|
||||
note: inside `main`
|
||||
--> $DIR/simd-scatter.rs:LL:CC
|
||||
|
|
||||
LL | / Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(
|
||||
@ -16,7 +6,12 @@ LL | | &mut vec,
|
||||
LL | | Mask::splat(true),
|
||||
LL | | idxs,
|
||||
LL | | );
|
||||
| |_________^
|
||||
| |_________^ dereferencing pointer failed: ALLOC has size 9, so pointer to 1 byte starting at offset 9 is out-of-bounds
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at $DIR/simd-scatter.rs:LL:CC
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user