diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-10-07 17:03:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-10-11 07:38:29 +0000 |
commit | a6dc28486910bde21d6854c1a64caadb0f663e1c (patch) | |
tree | df4e2b450a9280842c8c39103cef62d5d76b54f1 /src/gui/painting/qdrawingprimitive_sse2_p.h | |
parent | 17ac3b2c146d1f48b88dbdc09927ddc3dd3aef81 (diff) |
Avoid auto-vectorization of epilogues of manual vectorization
Defines a structure that tells the compiler in no uncertain terms the
maximum number of times a loop can be run.
The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes.
Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qdrawingprimitive_sse2_p.h')
-rw-r--r-- | src/gui/painting/qdrawingprimitive_sse2_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h index 7affc63b32..93e4b9f572 100644 --- a/src/gui/painting/qdrawingprimitive_sse2_p.h +++ b/src/gui/painting/qdrawingprimitive_sse2_p.h @@ -178,7 +178,7 @@ QT_BEGIN_NAMESPACE const __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]); \ BLEND_SOURCE_OVER_ARGB32_SSE2_helper(dst, srcVector, nullVector, half, one, colorMask, alphaMask) \ } \ - for (; x < length; ++x) { \ + SIMD_EPILOGUE(x, length, 3) { \ blend_pixel(dst[x], src[x]); \ } \ } @@ -219,7 +219,7 @@ QT_BEGIN_NAMESPACE _mm_store_si128((__m128i *)&dst[x], result); \ } \ } \ - for (; x < length; ++x) { \ + SIMD_EPILOGUE(x, length, 3) { \ blend_pixel(dst[x], src[x], const_alpha); \ } \ } |