File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11use coresimd:: simd:: * ;
22use coresimd:: simd_llvm:: * ;
33use coresimd:: x86:: * ;
4- use mem;
4+ use mem:: { self , MaybeUninit } ;
55
66#[ cfg( test) ]
77use stdsimd_test:: assert_instr;
@@ -14,7 +14,8 @@ use stdsimd_test::assert_instr;
1414#[ cfg_attr( test, assert_instr( vpabsd) ) ]
1515pub unsafe fn _mm512_abs_epi32 ( a : __m512i ) -> __m512i {
1616 let a = a. as_i32x16 ( ) ;
17- let zero: i32x16 = mem:: zeroed ( ) ;
17+ // all-0 is a properly initialized i32x16
18+ let zero: i32x16 = MaybeUninit :: zeroed ( ) . into_inner ( ) ;
1819 let sub = simd_sub ( zero, a) ;
1920 let cmp: i32x16 = simd_gt ( a, zero) ;
2021 mem:: transmute ( simd_select ( cmp, a, sub) )
@@ -54,7 +55,8 @@ pub unsafe fn _mm512_maskz_abs_epi32(k: __mmask16, a: __m512i) -> __m512i {
5455#[ target_feature( enable = "avx512f" ) ]
5556#[ cfg_attr( test, assert_instr( vxorps) ) ]
5657pub unsafe fn _mm512_setzero_si512 ( ) -> __m512i {
57- mem:: zeroed ( )
58+ // All-0 is a properly initialized __m512i
59+ MaybeUninit :: zeroed ( ) . into_inner ( )
5860}
5961
6062/// Set packed 32-bit integers in `dst` with the supplied values in reverse
You can’t perform that action at this time.
0 commit comments