Fix build with SSE 4.1 but not AVX2

Failed on my Sandybridge Mac with -march=native:

qstring.cpp:363:19: error: redefinition of 'mask' with a different type: 'const __m128i'

Change-Id: I6efb28c3145047559ec0fffd15386aeb8d36d681
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
Thiago Macieira 2018-06-15 12:07:13 -07:00
parent 4bf45691b5
commit 15553d3ea7

View File

@ -294,7 +294,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
# else
// SSE 4.1 implementation: test 32 bytes at a time (two 16-byte
// comparisons, unrolled)
const __m128i mask = _mm_set1_epi32(maskval);
mask = _mm_set1_epi32(maskval);
while (ptr + 32 <= end) {
__m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
__m128i data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr + 16));