diff --git a/GPU/Math3D.cpp b/GPU/Math3D.cpp index 22ad0f86d8e3..c4a6c7ea6db4 100644 --- a/GPU/Math3D.cpp +++ b/GPU/Math3D.cpp @@ -26,7 +26,8 @@ float Vec2::Length() const // Doubt this is worth it for a vec2 :/ #if defined(_M_SSE) float ret; - __m128 xy = _mm_loadu_ps(&x); + __m128d tmp = _mm_load_sd((const double*)&x); + __m128 xy = _mm_castpd_ps(tmp); __m128 sq = _mm_mul_ps(xy, xy); const __m128 r2 = _mm_shuffle_ps(sq, sq, _MM_SHUFFLE(0, 0, 0, 1)); const __m128 res = _mm_add_ss(sq, r2);