Skip to content

Commit 90543b0

Browse files
TDeckingAmanieu
authored andcommitted
Fix SSE2 sqrt
1 parent 81da73a commit 90543b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/core_arch/src/x86/sse2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use stdarch_test::assert_instr;
66
use crate::{
77
core_arch::{simd::*, x86::*},
88
intrinsics::simd::*,
9+
intrinsics::sqrtf64,
910
mem, ptr,
1011
};
1112

@@ -1760,7 +1761,7 @@ pub unsafe fn _mm_mul_pd(a: __m128d, b: __m128d) -> __m128d {
17601761
#[cfg_attr(test, assert_instr(sqrtsd))]
17611762
#[stable(feature = "simd_x86", since = "1.27.0")]
17621763
pub unsafe fn _mm_sqrt_sd(a: __m128d, b: __m128d) -> __m128d {
1763-
simd_insert!(a, 0, _mm_cvtsd_f64(b).sqrt())
1764+
simd_insert!(a, 0, sqrtf64(_mm_cvtsd_f64(b)))
17641765
}
17651766

17661767
/// Returns a new vector with the square root of each of the values in `a`.

0 commit comments

Comments
 (0)