Update tests for std::simd subtree sync

This commit is contained in:
Caleb Zulawski 2025-01-18 21:44:41 -05:00
parent 1ff6c555bb
commit 52b42d7187
16 changed files with 15 additions and 36 deletions

View file

@ -300,27 +300,6 @@ fn simd_mask() {
}
}
// This used to cause an ICE. It exercises simd_select_bitmask with an array as input.
let bitmask = u8x4::from_array([0b00001101, 0, 0, 0]);
assert_eq!(
mask32x4::from_bitmask_vector(bitmask),
mask32x4::from_array([true, false, true, true]),
);
let bitmask = u8x8::from_array([0b01000101, 0, 0, 0, 0, 0, 0, 0]);
assert_eq!(
mask32x8::from_bitmask_vector(bitmask),
mask32x8::from_array([true, false, true, false, false, false, true, false]),
);
let bitmask =
u8x16::from_array([0b01000101, 0b11110000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
assert_eq!(
mask32x16::from_bitmask_vector(bitmask),
mask32x16::from_array([
true, false, true, false, false, false, true, false, false, false, false, false, true,
true, true, true,
]),
);
// Also directly call simd_select_bitmask, to test both kinds of argument types.
unsafe {
// These masks are exactly the results we got out above in the `simd_bitmask` tests.

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -26,7 +26,7 @@
}
scope 11 (inlined NonZero::<usize>::get) {
}
scope 12 (inlined without_provenance::<[bool; 0]>) {
scope 12 (inlined std::ptr::without_provenance::<[bool; 0]>) {
scope 13 (inlined without_provenance_mut::<[bool; 0]>) {
}
}

View file

@ -16,7 +16,7 @@
}
scope 8 (inlined NonZero::<usize>::get) {
}
scope 9 (inlined without_provenance::<u8>) {
scope 9 (inlined std::ptr::without_provenance::<u8>) {
scope 10 (inlined without_provenance_mut::<u8>) {
}
}

View file

@ -59,7 +59,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
let _9: *const T;
scope 7 {
}
scope 12 (inlined without_provenance::<T>) {
scope 12 (inlined std::ptr::without_provenance::<T>) {
scope 13 (inlined without_provenance_mut::<T>) {
}
}

View file

@ -34,7 +34,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
let _9: *const T;
scope 7 {
}
scope 12 (inlined without_provenance::<T>) {
scope 12 (inlined std::ptr::without_provenance::<T>) {
scope 13 (inlined without_provenance_mut::<T>) {
}
}

View file

@ -31,7 +31,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
let _9: *const T;
scope 7 {
}
scope 12 (inlined without_provenance::<T>) {
scope 12 (inlined std::ptr::without_provenance::<T>) {
scope 13 (inlined without_provenance_mut::<T>) {
}
}

View file

@ -31,7 +31,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
let _9: *const T;
scope 7 {
}
scope 12 (inlined without_provenance::<T>) {
scope 12 (inlined std::ptr::without_provenance::<T>) {
scope 13 (inlined without_provenance_mut::<T>) {
}
}

View file

@ -34,7 +34,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
let _9: *const T;
scope 7 {
}
scope 12 (inlined without_provenance::<T>) {
scope 12 (inlined std::ptr::without_provenance::<T>) {
scope 13 (inlined without_provenance_mut::<T>) {
}
}

View file

@ -34,7 +34,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
let _9: *const T;
scope 7 {
}
scope 12 (inlined without_provenance::<T>) {
scope 12 (inlined std::ptr::without_provenance::<T>) {
scope 13 (inlined without_provenance_mut::<T>) {
}
}