File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
use coresimd:: simd:: * ;
2
2
use coresimd:: simd_llvm:: * ;
3
3
use coresimd:: x86:: * ;
4
- use mem;
4
+ use mem:: { self , MaybeUninit } ;
5
5
6
6
#[ cfg( test) ]
7
7
use stdsimd_test:: assert_instr;
@@ -14,7 +14,8 @@ use stdsimd_test::assert_instr;
14
14
#[ cfg_attr( test, assert_instr( vpabsd) ) ]
15
15
pub unsafe fn _mm512_abs_epi32 ( a : __m512i ) -> __m512i {
16
16
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 ( ) ;
18
19
let sub = simd_sub ( zero, a) ;
19
20
let cmp: i32x16 = simd_gt ( a, zero) ;
20
21
mem:: transmute ( simd_select ( cmp, a, sub) )
@@ -54,7 +55,8 @@ pub unsafe fn _mm512_maskz_abs_epi32(k: __mmask16, a: __m512i) -> __m512i {
54
55
#[ target_feature( enable = "avx512f" ) ]
55
56
#[ cfg_attr( test, assert_instr( vxorps) ) ]
56
57
pub unsafe fn _mm512_setzero_si512 ( ) -> __m512i {
57
- mem:: zeroed ( )
58
+ // All-0 is a properly initialized __m512i
59
+ MaybeUninit :: zeroed ( ) . into_inner ( )
58
60
}
59
61
60
62
/// 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