From ca919d65caf11fe0785df126999b8758e99dae4a Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Mon, 1 Jun 2020 10:01:35 +0200 Subject: [PATCH] Missed a guard --- src/sfizz/simd/HelpersSSE.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sfizz/simd/HelpersSSE.cpp b/src/sfizz/simd/HelpersSSE.cpp index 5f51e590..12fc77a4 100644 --- a/src/sfizz/simd/HelpersSSE.cpp +++ b/src/sfizz/simd/HelpersSSE.cpp @@ -11,7 +11,7 @@ #include #if SFIZZ_HAVE_SSE2 -#include +#include using Type = float; constexpr unsigned TypeAlignment = 4; constexpr unsigned ByteAlignment = TypeAlignment * sizeof(Type); @@ -125,8 +125,8 @@ void divideSSE(const float* input, const float* divisor, float* output, unsigned { const auto sentinel = output + size; +#if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); - while (unaligned(input, output) && output < lastAligned) *output++ = (*input++) / (*divisor++); @@ -134,6 +134,7 @@ void divideSSE(const float* input, const float* divisor, float* output, unsigned _mm_store_ps(output, _mm_div_ps(_mm_load_ps(input), _mm_load_ps(divisor))); incrementAll(divisor, input, output); } +#endif while (output < sentinel) *output++ = (*input++) / (*divisor++);