@@ -4,7 +4,7 @@ use std::mem;
4
4
5
5
#[ cfg( test) ]
6
6
use stdsimd_test:: assert_instr;
7
- use simd_llvm:: { simd_cast , simd_shuffle2, simd_shuffle4, simd_shuffle8} ;
7
+ use simd_llvm:: { simd_shuffle2, simd_shuffle4, simd_shuffle8} ;
8
8
9
9
use v128:: * ;
10
10
@@ -273,37 +273,32 @@ pub unsafe fn _mm_cvtepi8_epi16(a: i8x16) -> i16x8 {
273
273
#[ target_feature = "+sse4.1" ]
274
274
#[ cfg_attr( test, assert_instr( pmovsxbd) ) ]
275
275
pub unsafe fn _mm_cvtepi8_epi32 ( a : i8x16 ) -> i32x4 {
276
- let cast = simd_cast :: < _ , :: v512:: i32x16 > ( a) ;
277
- simd_shuffle4 ( cast, cast, [ 0 , 1 , 2 , 3 ] )
276
+ simd_shuffle4 :: < _ , :: v32:: i8x4 > ( a, a, [ 0 , 1 , 2 , 3 ] ) . as_i32x4 ( )
278
277
}
279
278
280
279
/// Sign extend packed 8-bit integers in the low 8 bytes of `a` to packed 64-bit integers
281
- /*
282
280
#[ inline( always) ]
283
281
#[ target_feature = "+sse4.1" ]
284
282
#[ cfg_attr( test, assert_instr( pmovsxbq) ) ]
285
283
pub unsafe fn _mm_cvtepi8_epi64 ( a : i8x16 ) -> i64x2 {
286
- simd_cast ::<::v16::i8x2, _>(simd_shuffle2( a, a, [0, 1]))
284
+ simd_shuffle2 :: < _ , :: v16:: i8x2 > ( a, a, [ 0 , 1 ] ) . as_i64x2 ( )
287
285
}
288
- */
289
286
290
287
/// Sign extend packed 16-bit integers in `a` to packed 32-bit integers
291
288
#[ inline( always) ]
292
289
#[ target_feature = "+sse4.1" ]
293
290
#[ cfg_attr( test, assert_instr( pmovsxwd) ) ]
294
291
pub unsafe fn _mm_cvtepi16_epi32 ( a : i16x8 ) -> i32x4 {
295
- simd_cast :: < :: v64:: i16x4 , _ > ( simd_shuffle4 ( a, a, [ 0 , 1 , 2 , 3 ] ) )
292
+ simd_shuffle4 :: < _ , :: v64:: i16x4 > ( a, a, [ 0 , 1 , 2 , 3 ] ) . as_i32x4 ( )
296
293
}
297
294
298
295
/// Sign extend packed 16-bit integers in a to packed 64-bit integers
299
- /*
300
296
#[ inline( always) ]
301
297
#[ target_feature = "+sse4.1" ]
302
298
#[ cfg_attr( test, assert_instr( pmovsxwq) ) ]
303
299
pub unsafe fn _mm_cvtepi16_epi64 ( a : i16x8 ) -> i64x2 {
304
- simd_cast ::<::v32::i16x2, _>(simd_shuffle2( a, a, [0, 1]))
300
+ simd_shuffle2 :: < _ , :: v32:: i16x2 > ( a, a, [ 0 , 1 ] ) . as_i64x4 ( )
305
301
}
306
- */
307
302
308
303
/// Returns the dot product of two f64x2 vectors.
309
304
///
@@ -829,7 +824,6 @@ mod tests {
829
824
assert_eq ! ( r, e) ;
830
825
}
831
826
832
- /*
833
827
#[ simd_test = "sse4.1" ]
834
828
unsafe fn _mm_cvtepi8_epi64 ( ) {
835
829
let a = i8x16:: splat ( 10 ) ;
@@ -841,7 +835,6 @@ mod tests {
841
835
let e = i64x2:: splat ( -10 ) ;
842
836
assert_eq ! ( r, e) ;
843
837
}
844
- */
845
838
846
839
#[ simd_test = "sse4.1" ]
847
840
unsafe fn _mm_cvtepi16_epi32 ( ) {
@@ -855,7 +848,6 @@ mod tests {
855
848
assert_eq ! ( r, e) ;
856
849
}
857
850
858
- /*
859
851
#[ simd_test = "sse4.1" ]
860
852
unsafe fn _mm_cvtepi16_epi64 ( ) {
861
853
let a = i16x8:: splat ( 10 ) ;
@@ -867,7 +859,7 @@ mod tests {
867
859
let e = i64x2:: splat ( -10 ) ;
868
860
assert_eq ! ( r, e) ;
869
861
}
870
- */
862
+
871
863
#[ simd_test = "sse4.1" ]
872
864
unsafe fn _mm_dp_pd ( ) {
873
865
let a = f64x2:: new ( 2.0 , 3.0 ) ;
0 commit comments