From 7c60d0f16362415a1bf77f2e814c488f64088d26 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 31 Mar 2022 08:36:34 -0700 Subject: Invert a check to put the first taken path first --- core/mixer/mixer_sse.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'core') diff --git a/core/mixer/mixer_sse.cpp b/core/mixer/mixer_sse.cpp index 3cfb00a5..22e20398 100644 --- a/core/mixer/mixer_sse.cpp +++ b/core/mixer/mixer_sse.cpp @@ -36,7 +36,17 @@ inline void ApplyCoeffs(float2 *RESTRICT Values, const size_t IrSize, const Cons * systems that support SSE, which is the only one that needs to know the * alignment of Values (which alternates between 8- and 16-byte aligned). */ - if(reinterpret_cast(Values)&0x8) + if(!(reinterpret_cast(Values)&15)) + { + for(size_t i{0};i < IrSize;i += 2) + { + const __m128 coeffs{_mm_load_ps(&Coeffs[i][0])}; + __m128 vals{_mm_load_ps(&Values[i][0])}; + vals = MLA4(vals, lrlr, coeffs); + _mm_store_ps(&Values[i][0], vals); + } + } + else { __m128 imp0, imp1; __m128 coeffs{_mm_load_ps(&Coeffs[0][0])}; @@ -61,16 +71,6 @@ inline void ApplyCoeffs(float2 *RESTRICT Values, const size_t IrSize, const Cons vals = _mm_add_ps(imp0, vals); _mm_storel_pi(reinterpret_cast<__m64*>(&Values[i][0]), vals); } - else - { - for(size_t i{0};i < IrSize;i += 2) - { - const __m128 coeffs{_mm_load_ps(&Coeffs[i][0])}; - __m128 vals{_mm_load_ps(&Values[i][0])}; - vals = MLA4(vals, lrlr, coeffs); - _mm_store_ps(&Values[i][0], vals); - } - } } } // namespace -- cgit v1.2.3