Skip to content

Commit 00e57f9

Browse files
saethlinAmanieu
authored andcommitted
Change remaining _undefined_ functions to zero-init
1 parent 344f829 commit 00e57f9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

crates/core_arch/src/x86/avx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2719,8 +2719,7 @@ pub unsafe fn _mm256_undefined_pd() -> __m256d {
27192719
// This intrinsic has no corresponding instruction.
27202720
#[stable(feature = "simd_x86", since = "1.27.0")]
27212721
pub unsafe fn _mm256_undefined_si256() -> __m256i {
2722-
// FIXME: this function should return MaybeUninit<__m256i>
2723-
mem::MaybeUninit::<__m256i>::uninit().assume_init()
2722+
__m256i(0, 0, 0, 0)
27242723
}
27252724

27262725
/// Sets packed __m256 returned vector with the supplied values.

crates/core_arch/src/x86/sse2.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,8 +2736,7 @@ pub unsafe fn _mm_castsi128_ps(a: __m128i) -> __m128 {
27362736
#[target_feature(enable = "sse2")]
27372737
#[stable(feature = "simd_x86", since = "1.27.0")]
27382738
pub unsafe fn _mm_undefined_pd() -> __m128d {
2739-
// FIXME: this function should return MaybeUninit<__m128d>
2740-
mem::MaybeUninit::<__m128d>::uninit().assume_init()
2739+
__m128d(0.0, 0.0)
27412740
}
27422741

27432742
/// Returns vector of type __m128i with undefined elements.
@@ -2747,8 +2746,7 @@ pub unsafe fn _mm_undefined_pd() -> __m128d {
27472746
#[target_feature(enable = "sse2")]
27482747
#[stable(feature = "simd_x86", since = "1.27.0")]
27492748
pub unsafe fn _mm_undefined_si128() -> __m128i {
2750-
// FIXME: this function should return MaybeUninit<__m128i>
2751-
mem::MaybeUninit::<__m128i>::uninit().assume_init()
2749+
__m128i(0, 0)
27522750
}
27532751

27542752
/// The resulting `__m128d` element is composed by the low-order values of

0 commit comments

Comments
 (0)