Clarify behavior of AVX2 gather when dest and offsets have different numbers of elements

This commit is contained in:
Eduardo Sánchez Muñoz 2024-04-27 16:41:27 +02:00
parent ee47a8e6b6
commit b3b1b498b9

View File

@ -71,6 +71,8 @@ fn emulate_x86_avx2_intrinsic(
let (dest, dest_len) = this.mplace_to_simd(dest)?;
// There are cases like dest: i32x4, offsets: i64x2
// If dest has more elements than offset, extra dest elements are filled with zero.
// If offsets has more elements than dest, extra offsets are ignored.
let actual_len = dest_len.min(offsets_len);
assert_eq!(dest_len, mask_len);