diff options
author | Chris Robinson <[email protected]> | 2022-03-31 08:36:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-03-31 08:36:34 -0700 |
commit | 7c60d0f16362415a1bf77f2e814c488f64088d26 (patch) | |
tree | ad2a94ecd1e1ca409a28978a197fe3be3f4d17d1 /core | |
parent | 9d240becad5652521c480d662cc5fe80d2223149 (diff) |
Invert a check to put the first taken path first
Diffstat (limited to 'core')
-rw-r--r-- | core/mixer/mixer_sse.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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<intptr_t>(Values)&0x8) + if(!(reinterpret_cast<uintptr_t>(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 |