From 86b59b1b593d35e8bb2afccdc10e9bf332223819 Mon Sep 17 00:00:00 2001 From: paulfd Date: Sun, 15 Sep 2019 23:01:40 +0200 Subject: [PATCH] Corrected a bug in the SSE version of the diff helper --- sfizz/SIMDSSE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfizz/SIMDSSE.cpp b/sfizz/SIMDSSE.cpp index 69b9fd07..c4cd2e98 100644 --- a/sfizz/SIMDSSE.cpp +++ b/sfizz/SIMDSSE.cpp @@ -795,7 +795,7 @@ void diff(absl::Span input, absl::Span output) while (unaligned(in, out) && in < lastAligned) snippetDiff(in, out); - auto mmBase = _mm_set_ps1(*(out - 1)); + auto mmBase = _mm_set_ps1(*(in - 1)); while (in < lastAligned) { auto mmOutput = _mm_load_ps(in); auto mmNextBase = _mm_shuffle_ps(mmOutput, mmOutput, _MM_SHUFFLE(3, 3, 3, 3));