aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-02-18 14:05:50 -0800
committerChris Robinson <[email protected]>2021-02-18 14:05:50 -0800
commit89ddad8487ad0fdbd7ca91a4ae294ecdd0669bae (patch)
tree3594cff41b63f6f26868753c6575bc2d4eaff6f3
parent8fd83778b8e5108f2bfd3157d7d1dccfc13bd272 (diff)
Use shifts instead of shuffles with SSE where possible
-rw-r--r--core/mixer/mixer_sse2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/mixer/mixer_sse2.cpp b/core/mixer/mixer_sse2.cpp
index f91d5dcd..99d04210 100644
--- a/core/mixer/mixer_sse2.cpp
+++ b/core/mixer/mixer_sse2.cpp
@@ -52,10 +52,10 @@ float *Resample_<LerpTag,SSE2Tag>(const InterpState*, float *RESTRICT src, uint
auto dst_iter = dst.begin();
for(size_t todo{dst.size()>>2};todo;--todo)
{
- const int pos0{_mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(0, 0, 0, 0)))};
- const int pos1{_mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(1, 1, 1, 1)))};
- const int pos2{_mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(2, 2, 2, 2)))};
- const int pos3{_mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(3, 3, 3, 3)))};
+ const int pos0{_mm_cvtsi128_si32(pos4)};
+ const int pos1{_mm_cvtsi128_si32(_mm_srli_si128(pos4, 4))};
+ const int pos2{_mm_cvtsi128_si32(_mm_srli_si128(pos4, 8))};
+ const int pos3{_mm_cvtsi128_si32(_mm_srli_si128(pos4, 12))};
const __m128 val1{_mm_setr_ps(src[pos0 ], src[pos1 ], src[pos2 ], src[pos3 ])};
const __m128 val2{_mm_setr_ps(src[pos0+1], src[pos1+1], src[pos2+1], src[pos3+1])};