@@ -9149,15 +9149,15 @@ pub unsafe fn _mm_mask_alignr_epi8<const IMM8: i32>(
91499149/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_maskz_alignr_epi8&expand=259)
91509150#[inline]
91519151#[target_feature(enable = "avx512bw,avx512vl")]
9152- #[rustc_args_required_const (3)]
9153- #[cfg_attr(test, assert_instr(vpalignr, imm8 = 5))]
9154- pub unsafe fn _mm_maskz_alignr_epi8(k: __mmask16, a: __m128i, b: __m128i, imm8: i32) -> __m128i {
9155- macro_rules! call {
9156- ($imm8:expr) => {
9157- _mm_alignr_epi8(a, b, $imm8)
9158- };
9159- }
9160- let r = constify_imm8_sae!(imm8, call );
9152+ #[rustc_legacy_const_generics (3)]
9153+ #[cfg_attr(test, assert_instr(vpalignr, IMM8 = 5))]
9154+ pub unsafe fn _mm_maskz_alignr_epi8<const IMM8: i32>(
9155+ k: __mmask16,
9156+ a: __m128i,
9157+ b: __m128i,
9158+ ) -> __m128i {
9159+ static_assert_imm8!(IMM8);
9160+ let r = _mm_alignr_epi8(a, b, IMM8 );
91619161 let zero = _mm_setzero_si128().as_i8x16();
91629162 transmute(simd_select_bitmask(k, r.as_i8x16(), zero))
91639163}
@@ -17788,9 +17788,9 @@ mod tests {
1778817788 unsafe fn test_mm_maskz_alignr_epi8() {
1778917789 let a = _mm_set_epi8(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0);
1779017790 let b = _mm_set1_epi8(1);
17791- let r = _mm_maskz_alignr_epi8(0, a, b, 14 );
17791+ let r = _mm_maskz_alignr_epi8::<14> (0, a, b);
1779217792 assert_eq_m128i(r, _mm_setzero_si128());
17793- let r = _mm_maskz_alignr_epi8(0b11111111_11111111, a, b, 14 );
17793+ let r = _mm_maskz_alignr_epi8::<14> (0b11111111_11111111, a, b);
1779417794 let e = _mm_set_epi8(0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1);
1779517795 assert_eq_m128i(r, e);
1779617796 }
0 commit comments