From 821aa1ff095ae66a89eb8725650dccac363f06ad Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 24 Jun 2022 14:27:18 +0200 Subject: Avoid SSE2 punning It is technical UB, even if GCC promises to let it work, but it also generates inefficient code. Pick-to: 6.4 Change-Id: I8f0cae3490d32287ecbaa16b1e9ace84223cda2a Reviewed-by: Thiago Macieira --- src/gui/painting/qdrawhelper_sse2.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index f26ad1a943..22014ec175 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -571,13 +571,14 @@ void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, __m128i srcxVector = _mm_set_epi32(srcx, srcx + ix, srcx + ix + ix, srcx + ix + ix + ix); - for (; x