@@ -370,6 +370,30 @@ pub unsafe fn _mm_cvtepu8_epi64(a: u8x16) -> i64x2 {
370
370
simd_shuffle2 :: < _ , :: v16:: u8x2 > ( a, a, [ 0 , 1 ] ) . as_i64x2 ( )
371
371
}
372
372
373
+ /// Zero extend packed unsigned 16-bit integers in `a` to packed 32-bit integers
374
+ #[ inline( always) ]
375
+ #[ target_feature = "+sse4.1" ]
376
+ #[ cfg_attr( test, assert_instr( pmovzxwd) ) ]
377
+ pub unsafe fn _mm_cvtepu16_epi32 ( a : u16x8 ) -> i32x4 {
378
+ simd_shuffle4 :: < _ , :: v64:: u16x4 > ( a, a, [ 0 , 1 , 2 , 3 ] ) . as_i32x4 ( )
379
+ }
380
+
381
+ /// Zero extend packed unsigned 16-bit integers in `a` to packed 64-bit integers
382
+ #[ inline( always) ]
383
+ #[ target_feature = "+sse4.1" ]
384
+ #[ cfg_attr( test, assert_instr( pmovzxwq) ) ]
385
+ pub unsafe fn _mm_cvtepu16_epi64 ( a : u16x8 ) -> i64x2 {
386
+ simd_shuffle2 :: < _ , :: v32:: u16x2 > ( a, a, [ 0 , 1 ] ) . as_i64x2 ( )
387
+ }
388
+
389
+ /// Zero extend packed unsigned 32-bit integers in `a` to packed 64-bit integers
390
+ #[ inline( always) ]
391
+ #[ target_feature = "+sse4.1" ]
392
+ #[ cfg_attr( test, assert_instr( pmovzxdq) ) ]
393
+ pub unsafe fn _mm_cvtepu32_epi64 ( a : u32x4 ) -> i64x2 {
394
+ simd_shuffle2 :: < _ , :: v64:: u32x2 > ( a, a, [ 0 , 1 ] ) . as_i64x2 ( )
395
+ }
396
+
373
397
/// Returns the dot product of two f64x2 vectors.
374
398
///
375
399
/// `imm8[1:0]` is the broadcast mask, and `imm8[5:4]` is the condition mask.
@@ -1081,15 +1105,37 @@ mod tests {
1081
1105
assert_eq ! ( r, e) ;
1082
1106
}
1083
1107
1084
- #[ simd_test = "sse4.1" ]
1108
+ #[ simd_test = "sse4.1" ]
1085
1109
unsafe fn _mm_cvtepu8_epi64 ( ) {
1086
1110
let a = u8x16:: splat ( 10 ) ;
1087
1111
let r = sse41:: _mm_cvtepu8_epi64 ( a) ;
1088
1112
let e = i64x2:: splat ( 10 ) ;
1089
1113
assert_eq ! ( r, e) ;
1090
1114
}
1091
1115
1116
+ #[ simd_test = "sse4.1" ]
1117
+ unsafe fn _mm_cvtepu16_epi32 ( ) {
1118
+ let a = u16x8:: splat ( 10 ) ;
1119
+ let r = sse41:: _mm_cvtepu16_epi32 ( a) ;
1120
+ let e = i32x4:: splat ( 10 ) ;
1121
+ assert_eq ! ( r, e) ;
1122
+ }
1092
1123
1124
+ #[ simd_test = "sse4.1" ]
1125
+ unsafe fn _mm_cvtepu16_epi64 ( ) {
1126
+ let a = u16x8:: splat ( 10 ) ;
1127
+ let r = sse41:: _mm_cvtepu16_epi64 ( a) ;
1128
+ let e = i64x2:: splat ( 10 ) ;
1129
+ assert_eq ! ( r, e) ;
1130
+ }
1131
+
1132
+ #[ simd_test = "sse4.1" ]
1133
+ unsafe fn _mm_cvtepu32_epi64 ( ) {
1134
+ let a = u32x4:: splat ( 10 ) ;
1135
+ let r = sse41:: _mm_cvtepu32_epi64 ( a) ;
1136
+ let e = i64x2:: splat ( 10 ) ;
1137
+ assert_eq ! ( r, e) ;
1138
+ }
1093
1139
1094
1140
#[ simd_test = "sse4.1" ]
1095
1141
unsafe fn _mm_dp_pd ( ) {
0 commit comments