@@ -21896,57 +21896,57 @@ pub unsafe fn _mm256_maskz_extractf32x4_ps<const IMM8: i32>(k: __mmask8, a: __m2
21896
21896
transmute(simd_select_bitmask(k, r.as_f32x4(), zero))
21897
21897
}
21898
21898
21899
- /// Extract 256 bits (composed of 4 packed 64-bit integers) from a, selected with imm8 , and store the result in dst.
21899
+ /// Extract 256 bits (composed of 4 packed 64-bit integers) from a, selected with IMM1 , and store the result in dst.
21900
21900
///
21901
21901
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_extracti64x4_epi64&expand=2473)
21902
21902
#[inline]
21903
21903
#[target_feature(enable = "avx512f")]
21904
21904
#[cfg_attr(
21905
21905
all(test, not(target_os = "windows")),
21906
- assert_instr(vextractf64x4, imm8 = 1) //should be vextracti64x4
21906
+ assert_instr(vextractf64x4, IMM1 = 1) //should be vextracti64x4
21907
21907
)]
21908
- #[rustc_args_required_const (1)]
21909
- pub unsafe fn _mm512_extracti64x4_epi64(a: __m512i, imm8: i32 ) -> __m256i {
21910
- assert!(imm8 >= 0 && imm8 <= 1 );
21911
- match imm8 & 0x1 {
21908
+ #[rustc_legacy_const_generics (1)]
21909
+ pub unsafe fn _mm512_extracti64x4_epi64<const IMM1: i32> (a: __m512i) -> __m256i {
21910
+ static_assert_imm1!(IMM1 );
21911
+ match IMM1 {
21912
21912
0 => simd_shuffle4(a, _mm512_set1_epi64(0), [0, 1, 2, 3]),
21913
21913
_ => simd_shuffle4(a, _mm512_set1_epi64(0), [4, 5, 6, 7]),
21914
21914
}
21915
21915
}
21916
21916
21917
- /// Extract 256 bits (composed of 4 packed 64-bit integers) from a, selected with imm8 , and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set).
21917
+ /// Extract 256 bits (composed of 4 packed 64-bit integers) from a, selected with IMM1 , and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set).
21918
21918
///
21919
21919
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_mask_extracti64x4_epi64&expand=2474)
21920
21920
#[inline]
21921
21921
#[target_feature(enable = "avx512f")]
21922
21922
#[cfg_attr(
21923
21923
all(test, not(target_os = "windows")),
21924
- assert_instr(vextracti64x4, IMM8 = 1)
21924
+ assert_instr(vextracti64x4, IMM1 = 1)
21925
21925
)]
21926
21926
#[rustc_legacy_const_generics(3)]
21927
- pub unsafe fn _mm512_mask_extracti64x4_epi64<const IMM8 : i32>(
21927
+ pub unsafe fn _mm512_mask_extracti64x4_epi64<const IMM1 : i32>(
21928
21928
src: __m256i,
21929
21929
k: __mmask8,
21930
21930
a: __m512i,
21931
21931
) -> __m256i {
21932
- static_assert_imm1!(IMM8 );
21933
- let r = _mm512_extracti64x4_epi64(a, IMM8 );
21932
+ static_assert_imm1!(IMM1 );
21933
+ let r = _mm512_extracti64x4_epi64::<IMM1>(a );
21934
21934
transmute(simd_select_bitmask(k, r.as_i64x4(), src.as_i64x4()))
21935
21935
}
21936
21936
21937
- /// Extract 256 bits (composed of 4 packed 64-bit integers) from a, selected with imm8 , and store the results in dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set).
21937
+ /// Extract 256 bits (composed of 4 packed 64-bit integers) from a, selected with IMM1 , and store the results in dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set).
21938
21938
///
21939
21939
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_maskz_extracti64x4_epi64&expand=2475)
21940
21940
#[inline]
21941
21941
#[target_feature(enable = "avx512f")]
21942
21942
#[cfg_attr(
21943
21943
all(test, not(target_os = "windows")),
21944
- assert_instr(vextracti64x4, IMM8 = 1)
21944
+ assert_instr(vextracti64x4, IMM1 = 1)
21945
21945
)]
21946
21946
#[rustc_legacy_const_generics(2)]
21947
- pub unsafe fn _mm512_maskz_extracti64x4_epi64<const IMM8 : i32>(k: __mmask8, a: __m512i) -> __m256i {
21948
- static_assert_imm1!(IMM8 );
21949
- let r = _mm512_extracti64x4_epi64(a, IMM8 );
21947
+ pub unsafe fn _mm512_maskz_extracti64x4_epi64<const IMM1 : i32>(k: __mmask8, a: __m512i) -> __m256i {
21948
+ static_assert_imm1!(IMM1 );
21949
+ let r = _mm512_extracti64x4_epi64::<IMM1>(a );
21950
21950
let zero = _mm256_setzero_si256().as_i64x4();
21951
21951
transmute(simd_select_bitmask(k, r.as_i64x4(), zero))
21952
21952
}
@@ -22006,21 +22006,21 @@ pub unsafe fn _mm512_maskz_extractf64x4_pd<const IMM8: i32>(k: __mmask8, a: __m5
22006
22006
transmute(simd_select_bitmask(k, r.as_f64x4(), zero))
22007
22007
}
22008
22008
22009
- /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with imm8 , and store the result in dst.
22009
+ /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with IMM2 , and store the result in dst.
22010
22010
///
22011
22011
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_extracti32x4_epi32&expand=2461)
22012
22012
#[inline]
22013
22013
#[target_feature(enable = "avx512f")]
22014
22014
#[cfg_attr(
22015
22015
all(test, not(target_os = "windows")),
22016
- assert_instr(vextractf32x4, imm8 = 3) //should be vextracti32x4
22016
+ assert_instr(vextractf32x4, IMM2 = 3) //should be vextracti32x4
22017
22017
)]
22018
- #[rustc_args_required_const (1)]
22019
- pub unsafe fn _mm512_extracti32x4_epi32(a: __m512i, imm8: i32 ) -> __m128i {
22020
- assert!(imm8 >= 0 && imm8 <= 3 );
22018
+ #[rustc_legacy_const_generics (1)]
22019
+ pub unsafe fn _mm512_extracti32x4_epi32<const IMM2: i32> (a: __m512i) -> __m128i {
22020
+ static_assert_imm2!(IMM2 );
22021
22021
let a = a.as_i32x16();
22022
22022
let undefined = _mm512_undefined_epi32().as_i32x16();
22023
- let extract: i32x4 = match imm8 & 0x3 {
22023
+ let extract: i32x4 = match IMM2 {
22024
22024
0 => simd_shuffle4(a, undefined, [0, 1, 2, 3]),
22025
22025
1 => simd_shuffle4(a, undefined, [4, 5, 6, 7]),
22026
22026
2 => simd_shuffle4(a, undefined, [8, 9, 10, 11]),
@@ -22029,97 +22029,97 @@ pub unsafe fn _mm512_extracti32x4_epi32(a: __m512i, imm8: i32) -> __m128i {
22029
22029
transmute(extract)
22030
22030
}
22031
22031
22032
- /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with imm8 , and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set).
22032
+ /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with IMM2 , and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set).
22033
22033
///
22034
22034
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_mask_extracti32x4_epi32&expand=2462)
22035
22035
#[inline]
22036
22036
#[target_feature(enable = "avx512f")]
22037
22037
#[cfg_attr(
22038
22038
all(test, not(target_os = "windows")),
22039
- assert_instr(vextracti32x4, IMM8 = 3)
22039
+ assert_instr(vextracti32x4, IMM2 = 3)
22040
22040
)]
22041
22041
#[rustc_legacy_const_generics(3)]
22042
- pub unsafe fn _mm512_mask_extracti32x4_epi32<const IMM8 : i32>(
22042
+ pub unsafe fn _mm512_mask_extracti32x4_epi32<const IMM2 : i32>(
22043
22043
src: __m128i,
22044
22044
k: __mmask8,
22045
22045
a: __m512i,
22046
22046
) -> __m128i {
22047
- static_assert_imm2!(IMM8 );
22048
- let r = _mm512_extracti32x4_epi32(a, IMM8 );
22047
+ static_assert_imm2!(IMM2 );
22048
+ let r = _mm512_extracti32x4_epi32::<IMM2>(a );
22049
22049
transmute(simd_select_bitmask(k, r.as_i32x4(), src.as_i32x4()))
22050
22050
}
22051
22051
22052
- /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with imm8 , and store the results in dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set).
22052
+ /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with IMM2 , and store the results in dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set).
22053
22053
///
22054
22054
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_maskz_extracti32x4_epi32&expand=2463)
22055
22055
#[inline]
22056
22056
#[target_feature(enable = "avx512f")]
22057
22057
#[cfg_attr(
22058
22058
all(test, not(target_os = "windows")),
22059
- assert_instr(vextracti32x4, IMM8 = 3)
22059
+ assert_instr(vextracti32x4, IMM2 = 3)
22060
22060
)]
22061
22061
#[rustc_legacy_const_generics(2)]
22062
- pub unsafe fn _mm512_maskz_extracti32x4_epi32<const IMM8 : i32>(k: __mmask8, a: __m512i) -> __m128i {
22063
- static_assert_imm2!(IMM8 );
22064
- let r = _mm512_extracti32x4_epi32(a, IMM8 );
22062
+ pub unsafe fn _mm512_maskz_extracti32x4_epi32<const IMM2 : i32>(k: __mmask8, a: __m512i) -> __m128i {
22063
+ static_assert_imm2!(IMM2 );
22064
+ let r = _mm512_extracti32x4_epi32::<IMM2>(a );
22065
22065
let zero = _mm_setzero_si128().as_i32x4();
22066
22066
transmute(simd_select_bitmask(k, r.as_i32x4(), zero))
22067
22067
}
22068
22068
22069
- /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with imm8 , and store the result in dst.
22069
+ /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with IMM1 , and store the result in dst.
22070
22070
///
22071
22071
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_extracti32x4_epi32&expand=2458)
22072
22072
#[inline]
22073
22073
#[target_feature(enable = "avx512f,avx512vl")]
22074
22074
#[cfg_attr(
22075
22075
all(test, not(target_os = "windows")),
22076
- assert_instr(vextract, imm8 = 1) //should be vextracti32x4
22076
+ assert_instr(vextract, IMM1 = 1) //should be vextracti32x4
22077
22077
)]
22078
- #[rustc_args_required_const (1)]
22079
- pub unsafe fn _mm256_extracti32x4_epi32(a: __m256i, imm8: i32 ) -> __m128i {
22080
- assert!(imm8 >= 0 && imm8 <= 1 );
22078
+ #[rustc_legacy_const_generics (1)]
22079
+ pub unsafe fn _mm256_extracti32x4_epi32<const IMM1: i32> (a: __m256i) -> __m128i {
22080
+ static_assert_imm1!(IMM1 );
22081
22081
let a = a.as_i32x8();
22082
22082
let undefined = _mm256_undefined_si256().as_i32x8();
22083
- let extract: i32x4 = match imm8 & 0x1 {
22083
+ let extract: i32x4 = match IMM1 {
22084
22084
0 => simd_shuffle4(a, undefined, [0, 1, 2, 3]),
22085
22085
_ => simd_shuffle4(a, undefined, [4, 5, 6, 7]),
22086
22086
};
22087
22087
transmute(extract)
22088
22088
}
22089
22089
22090
- /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with imm8 , and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set).
22090
+ /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with IMM1 , and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set).
22091
22091
///
22092
22092
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_mask_extracti32x4_epi32&expand=2459)
22093
22093
#[inline]
22094
22094
#[target_feature(enable = "avx512f,avx512vl")]
22095
22095
#[cfg_attr(
22096
22096
all(test, not(target_os = "windows")),
22097
- assert_instr(vextracti32x4, IMM8 = 1)
22097
+ assert_instr(vextracti32x4, IMM1 = 1)
22098
22098
)]
22099
22099
#[rustc_legacy_const_generics(3)]
22100
- pub unsafe fn _mm256_mask_extracti32x4_epi32<const IMM8 : i32>(
22100
+ pub unsafe fn _mm256_mask_extracti32x4_epi32<const IMM1 : i32>(
22101
22101
src: __m128i,
22102
22102
k: __mmask8,
22103
22103
a: __m256i,
22104
22104
) -> __m128i {
22105
- static_assert_imm1!(IMM8 );
22106
- let r = _mm256_extracti32x4_epi32(a, IMM8 );
22105
+ static_assert_imm1!(IMM1 );
22106
+ let r = _mm256_extracti32x4_epi32::<IMM1>(a );
22107
22107
transmute(simd_select_bitmask(k, r.as_i32x4(), src.as_i32x4()))
22108
22108
}
22109
22109
22110
- /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with imm8 , and store the results in dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set).
22110
+ /// Extract 128 bits (composed of 4 packed 32-bit integers) from a, selected with IMM1 , and store the results in dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set).
22111
22111
///
22112
22112
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_maskz_extracti32x4_epi32&expand=2460)
22113
22113
#[inline]
22114
22114
#[target_feature(enable = "avx512f,avx512vl")]
22115
22115
#[cfg_attr(
22116
22116
all(test, not(target_os = "windows")),
22117
- assert_instr(vextracti32x4, IMM8 = 1)
22117
+ assert_instr(vextracti32x4, IMM1 = 1)
22118
22118
)]
22119
22119
#[rustc_legacy_const_generics(2)]
22120
- pub unsafe fn _mm256_maskz_extracti32x4_epi32<const IMM8 : i32>(k: __mmask8, a: __m256i) -> __m128i {
22121
- static_assert_imm1!(IMM8 );
22122
- let r = _mm256_extracti32x4_epi32(a, IMM8 );
22120
+ pub unsafe fn _mm256_maskz_extracti32x4_epi32<const IMM1 : i32>(k: __mmask8, a: __m256i) -> __m128i {
22121
+ static_assert_imm1!(IMM1 );
22122
+ let r = _mm256_extracti32x4_epi32::<IMM1>(a );
22123
22123
let zero = _mm_setzero_si128().as_i32x4();
22124
22124
transmute(simd_select_bitmask(k, r.as_i32x4(), zero))
22125
22125
}
@@ -46698,7 +46698,7 @@ mod tests {
46698
46698
#[simd_test(enable = "avx512f")]
46699
46699
unsafe fn test_mm512_extracti32x4_epi32() {
46700
46700
let a = _mm512_setr_epi32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
46701
- let r = _mm512_extracti32x4_epi32(a, 0b1 );
46701
+ let r = _mm512_extracti32x4_epi32::<1>(a );
46702
46702
let e = _mm_setr_epi32(5, 6, 7, 8);
46703
46703
assert_eq_m128i(r, e);
46704
46704
}
@@ -46727,7 +46727,7 @@ mod tests {
46727
46727
#[simd_test(enable = "avx512f,avx512vl")]
46728
46728
unsafe fn test_mm256_extracti32x4_epi32() {
46729
46729
let a = _mm256_set_epi32(1, 2, 3, 4, 5, 6, 7, 8);
46730
- let r = _mm256_extracti32x4_epi32(a, 0b1 );
46730
+ let r = _mm256_extracti32x4_epi32::<1>(a );
46731
46731
let e = _mm_set_epi32(1, 2, 3, 4);
46732
46732
assert_eq_m128i(r, e);
46733
46733
}
0 commit comments