@@ -1641,8 +1641,7 @@ pub unsafe fn _mm512_mask_cmp_epi64_mask(
1641
1641
#[ target_feature( enable = "avx512f" ) ]
1642
1642
// This intrinsic has no corresponding instruction.
1643
1643
pub unsafe fn _mm512_undefined_pd ( ) -> __m512d {
1644
- // FIXME: this function should return MaybeUninit<__m512d>
1645
- mem:: MaybeUninit :: < __m512d > :: uninit ( ) . assume_init ( )
1644
+ _mm512_set1_pd ( 0.0 )
1646
1645
}
1647
1646
1648
1647
/// Returns vector of type `__m512` with undefined elements.
@@ -1652,8 +1651,7 @@ pub unsafe fn _mm512_undefined_pd() -> __m512d {
1652
1651
#[ target_feature( enable = "avx512f" ) ]
1653
1652
// This intrinsic has no corresponding instruction.
1654
1653
pub unsafe fn _mm512_undefined_ps ( ) -> __m512 {
1655
- // FIXME: this function should return MaybeUninit<__m512>
1656
- mem:: MaybeUninit :: < __m512 > :: uninit ( ) . assume_init ( )
1654
+ _mm512_set1_ps ( 0.0 )
1657
1655
}
1658
1656
1659
1657
/// Loads 512-bits (composed of 8 packed double-precision (64-bit)
@@ -1665,13 +1663,7 @@ pub unsafe fn _mm512_undefined_ps() -> __m512 {
1665
1663
#[ target_feature( enable = "avx512f" ) ]
1666
1664
#[ cfg_attr( test, assert_instr( vmovupd) ) ]
1667
1665
pub unsafe fn _mm512_loadu_pd ( mem_addr : * const f64 ) -> __m512d {
1668
- let mut dst = _mm512_undefined_pd ( ) ;
1669
- ptr:: copy_nonoverlapping (
1670
- mem_addr as * const u8 ,
1671
- & mut dst as * mut __m512d as * mut u8 ,
1672
- mem:: size_of :: < __m512d > ( ) ,
1673
- ) ;
1674
- dst
1666
+ ptr:: read_unaligned ( mem_addr as * const __m512d )
1675
1667
}
1676
1668
1677
1669
/// Stores 512-bits (composed of 8 packed double-precision (64-bit)
@@ -1699,13 +1691,7 @@ pub unsafe fn _mm512_storeu_pd(mem_addr: *mut f64, a: __m512d) {
1699
1691
#[ target_feature( enable = "avx512f" ) ]
1700
1692
#[ cfg_attr( test, assert_instr( vmovups) ) ]
1701
1693
pub unsafe fn _mm512_loadu_ps ( mem_addr : * const f32 ) -> __m512 {
1702
- let mut dst = _mm512_undefined_ps ( ) ;
1703
- ptr:: copy_nonoverlapping (
1704
- mem_addr as * const u8 ,
1705
- & mut dst as * mut __m512 as * mut u8 ,
1706
- mem:: size_of :: < __m512 > ( ) ,
1707
- ) ;
1708
- dst
1694
+ ptr:: read_unaligned ( mem_addr as * const __m512 )
1709
1695
}
1710
1696
1711
1697
/// Stores 512-bits (composed of 16 packed single-precision (32-bit)
0 commit comments