Fix build error with lambda on GCC 9.2

This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2.

Fixes: QTBUG-112920
Pick-to: 6.5
Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b404930e122013e76ba8fe165f3432288c051438)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 32fa63f650be5b2d5d2c219d9150f994c761bd75)
This commit is contained in:
shjiu 2023-11-17 09:41:31 +09:00 committed by Qt Cherry-pick Bot
parent 8304e20809
commit 5a57419964

View File

@ -471,7 +471,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
if constexpr (UseSse4_1) {
# ifndef Q_OS_QNX // compiler fails in the code below
__m128i mask;
auto updatePtrSimd = [&](__m128i data) {
auto updatePtrSimd = [&](__m128i data) -> bool {
__m128i masked = _mm_and_si128(mask, data);
__m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
uint result = _mm_movemask_epi8(comparison);