From 116e7a267e2de116f7245e8f1c06d9a4ab174e26 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 30 Sep 2016 13:14:01 +0200 Subject: [PATCH] Fix qt_blend_rgb32_on_rgb32_avx2 The order of the arguments to testc was wrong, it should have been the other way. Replaced with testz to also get rid of setzero. Change-Id: Iff968c140f9ca34c6bd7c7f04a3623fd8ec42e1c Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/painting/qdrawhelper_avx2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp index 01ffd54918..b3fa380dc0 100644 --- a/src/gui/painting/qdrawhelper_avx2.cpp +++ b/src/gui/painting/qdrawhelper_avx2.cpp @@ -267,7 +267,7 @@ void qt_blend_rgb32_on_rgb32_avx2(uchar *destPixels, int dbpl, // 2) interpolate pixels with AVX2 for (; x < (w - 7); x += 8) { const __m256i srcVector = _mm256_lddqu_si256((const __m256i *)&src[x]); - if (!_mm256_testc_si256(srcVector, _mm256_setzero_si256())) { + if (!_mm256_testz_si256(srcVector, srcVector)) { __m256i dstVector = _mm256_load_si256((__m256i *)&dst[x]); INTERPOLATE_PIXEL_255_AVX2(srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half); _mm256_store_si256((__m256i *)&dst[x], dstVector);