Skip to content

Commit 30dea92

Browse files
eduardosmAmanieu
authored andcommitted
Extend _mm_shuffle_epi8 test to check index wrapping
1 parent 574f3d3 commit 30dea92

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/core_arch/src/x86/ssse3.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,11 @@ mod tests {
372372
let expected = _mm_setr_epi8(5, 0, 5, 4, 9, 13, 7, 4, 13, 6, 6, 11, 5, 2, 9, 1);
373373
let r = _mm_shuffle_epi8(a, b);
374374
assert_eq_m128i(r, expected);
375+
376+
// Test indices greater than 15 wrapping around
377+
let b = _mm_add_epi8(b, _mm_set1_epi8(32));
378+
let r = _mm_shuffle_epi8(a, b);
379+
assert_eq_m128i(r, expected);
375380
}
376381

377382
#[simd_test(enable = "ssse3")]

0 commit comments

Comments
 (0)