Skip to content

Commit 81da73a

Browse files
TDeckingAmanieu
authored andcommitted
Fix SSE sqrt
1 parent 0751f0e commit 81da73a

File tree

1 file changed

+2
-1
lines changed
  • crates/core_arch/src/x86

1 file changed

+2
-1
lines changed

crates/core_arch/src/x86/sse.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use crate::{
44
core_arch::{simd::*, x86::*},
55
intrinsics::simd::*,
6+
intrinsics::sqrtf32,
67
mem, ptr,
78
};
89

@@ -110,7 +111,7 @@ pub unsafe fn _mm_div_ps(a: __m128, b: __m128) -> __m128 {
110111
#[cfg_attr(test, assert_instr(sqrtss))]
111112
#[stable(feature = "simd_x86", since = "1.27.0")]
112113
pub unsafe fn _mm_sqrt_ss(a: __m128) -> __m128 {
113-
simd_insert!(a, 0, _mm_cvtss_f32(a).sqrt())
114+
simd_insert!(a, 0, sqrtf32(_mm_cvtss_f32(a)))
114115
}
115116

116117
/// Returns the square root of packed single-precision (32-bit) floating-point

0 commit comments

Comments
 (0)