diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-05-23 00:54:19 -0300 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-09 00:18:24 +0000 |
commit | c3a4ec5d0bbd5f2710f4fd1d3bd4a2d7f0f507ad (patch) | |
tree | f18c0e54743eb213df0e5374bb5fdf4281aa5c4e /src/gui | |
parent | 746f15d0c213fef0e46207682815bd839a36ecc6 (diff) | |
download | qtbase-c3a4ec5d0bbd5f2710f4fd1d3bd4a2d7f0f507ad.tar.gz |
SIMD: Add a haswell sub-architecture selection to our support
As the comment says, Haswell is a nice divider and is a good
optimization target.
I'm using -march=core-avx2 instead of -march=haswell because the latter
form was only added to GCC 4.9 but we still support 4.7 and that has
support for AVX2.
This commit changes the AVX2-optimized code in QtGui to Haswell-
optimized instead. That means, for example, that qdrawhelper_avx2.cpp
can now use the FMA instructions.
Change-Id: If025d476890745368955fffd153129c1716ba006
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/painting.pri | 2 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 749cc221ff..c3585a4647 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -127,7 +127,7 @@ SSE2_SOURCES += painting/qdrawhelper_sse2.cpp SSSE3_SOURCES += painting/qdrawhelper_ssse3.cpp SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp \ painting/qimagescale_sse4.cpp -AVX2_SOURCES += painting/qdrawhelper_avx2.cpp +ARCH_HASWELL_SOURCES += painting/qdrawhelper_avx2.cpp NEON_SOURCES += painting/qdrawhelper_neon.cpp painting/qimagescale_neon.cpp NEON_HEADERS += painting/qdrawhelper_neon_p.h diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 5892d59a64..235bba7206 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -5772,7 +5772,7 @@ static void qInitDrawhelperFunctions() #endif #if defined(QT_COMPILER_SUPPORTS_AVX2) - if (qCpuHasFeature(AVX2)) { + if (qCpuHasFeature(ArchHaswell)) { extern void qt_blend_rgb32_on_rgb32_avx2(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha); |