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/qdrawhelper.cpp | |
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/qdrawhelper.cpp')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 3e01d34cb2..928a56fd2f 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -603,7 +603,7 @@ static inline void qConvertARGB32PMToARGB64PM_sse2(QRgba64 *buffer, const uint * buffer += 2; } - for (; i < count; ++i) { + SIMD_EPILOGUE(i, count, 3) { uint s = *src++; if (RGBA) s = RGBA2ARGB(s); @@ -766,7 +766,7 @@ static inline void qConvertA2RGB30PMToARGB64PM_sse2(QRgba64 *buffer, const uint buffer += 2; } - for (; i < count; ++i) + SIMD_EPILOGUE(i, count, 3) *buffer++ = qConvertA2rgb30ToRgb64<PixelOrder>(*src++); } #endif @@ -1397,7 +1397,7 @@ static inline void qConvertARGB64PMToA2RGB30PM_sse2(uint *dest, const QRgba64 *b } } - for (; i < count; ++i) + SIMD_EPILOGUE(i, count, 15) *dest++ = qConvertRgb64ToRgb30<PixelOrder>(*buffer++); } #endif |