diff options
author | Mario Emmenlauer <memmenlauer@biodataanalysis.de> | 2022-03-07 14:48:32 +0100 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-04-26 19:38:12 -0700 |
commit | f3640d908633b0e512077f24c41eca851879f0ed (patch) | |
tree | de741c3a1857e716dc5893c155c4b193b1fa2e61 /src | |
parent | 860b8d00ca766647bc644af733371046cd198239 (diff) |
Fix for ClangCl missing F16C intrinsics in qfloat16.h
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Fixes: QTBUG-101175
Change-Id: I46ef5c473f174e54a8cffffd16e5334d3b5944b8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qfloat16.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index d9fd89215d..eef5a6152a 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -48,12 +48,13 @@ #include <string.h> #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) -// All processors that support AVX2 do support F16C too. That doesn't mean -// we're allowed to use the intrinsics directly, so we'll do it only for -// the Intel and Microsoft's compilers. -# if defined(Q_CC_INTEL) || defined(Q_CC_MSVC) +// All processors that support AVX2 do support F16C too, so we could enable the +// feature unconditionally if __AVX2__ is defined. However, all currently +// supported compilers except Microsoft's are able to define __F16C__ on their +// own when the user enables the feature, so we'll trust them. +# if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG) # define __F16C__ 1 -# endif +# endif #endif #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__) |