also test simd_select_bitmask on arrays for less than 8 elements

This commit is contained in:
Ralf Jung 2023-12-03 14:42:41 +01:00
parent 28f9fe3262
commit 56f50d53d1

View File

@ -266,7 +266,12 @@ fn simd_mask() {
}
}
// This used to cause an ICE.
// 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),