diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-10-31 16:07:53 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-04-17 00:04:21 +0000 |
commit | 3bea9450e90a6c8db1554faa5b467186e63b31a0 (patch) | |
tree | e905c954a81e098537070c0af0f22027a5bd9e8b /src/corelib | |
parent | 2814744a739dfab123448f92e2009c34a82976a3 (diff) |
Update the Clang support for SIMD code generation
Clang 3.8 has support for __attribute__((target(xxx))) and its SIMD
headers can be included unconditionally.
Change-Id: Ic15b7ff417c8412893e5fffd14b5b42b950b48d7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qsimd_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index d5d887598e..28253b3ae9 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -166,10 +166,11 @@ # define __MIPS_DSPR2__ # endif #elif (defined(Q_CC_INTEL) || defined(Q_CC_MSVC) \ - || (defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && (__GNUC__-0) * 100 + (__GNUC_MINOR__-0) >= 409)) \ + || (defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && Q_CC_GNU >= 409) \ + || (defined(Q_CC_CLANG) && Q_CC_CLANG >= 308)) \ && !defined(QT_BOOTSTRAPPED) # define QT_COMPILER_SUPPORTS_SIMD_ALWAYS -# define QT_COMPILER_SUPPORTS_HERE(x) (__ ## x ## __) || QT_COMPILER_SUPPORTS(x) +# define QT_COMPILER_SUPPORTS_HERE(x) ((__ ## x ## __) || QT_COMPILER_SUPPORTS(x)) # if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) /* GCC requires attributes for a function */ # define QT_FUNCTION_TARGET(x) __attribute__((__target__(QT_FUNCTION_TARGET_STRING_ ## x))) |