diff --git a/configure.cmake b/configure.cmake index 95995a558df..adc3d481b01 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1274,6 +1274,16 @@ if (TEST_architecture_arch STREQUAL x86_64 OR TEST_architecture_arch STREQUAL i3 MESSAGE [=[ All x86 intrinsics and SIMD support were disabled. If this was in error, check the result of the build in config.tests/x86intrin and report at https://bugreports.qt.io. +]=] + ) + elseif (MSVC AND CLANG) + # Warn only + qt_configure_add_report_entry( + TYPE WARNING + CONDITION (NOT QT_FEATURE_x86intrin) + MESSAGE [=[ +x86 intrinsics support is disabled for clang-cl build. This might be necessary due to +https://github.com/llvm/llvm-project/issues/53520 ]=] ) else() diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index 9765ce4a319..40c459991c8 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -180,7 +180,7 @@ static inline bool convertDoubleTo(double v, T *value, bool allow_precision_upgr // correct, but Clang, ICC and MSVC don't realize that it's a constant and // the math call stays in the compiled code. -#ifdef Q_PROCESSOR_X86_64 +#if defined(Q_PROCESSOR_X86_64) && defined(__SSE2__) // Of course, UB doesn't apply if we use intrinsics, in which case we are // allowed to dpeend on exactly the processor's behavior. This // implementation uses the truncating conversions from Scalar Double to diff --git a/src/corelib/global/qsimd.h b/src/corelib/global/qsimd.h index 6ed7821e269..4ef925ca337 100644 --- a/src/corelib/global/qsimd.h +++ b/src/corelib/global/qsimd.h @@ -55,7 +55,7 @@ #if defined(Q_PROCESSOR_X86) && defined(Q_CC_MSVC) // MSVC doesn't define __SSE2__, so do it ourselves -# if (defined(_M_X64) || _M_IX86_FP >= 2) +# if (defined(_M_X64) || _M_IX86_FP >= 2) && defined(QT_COMPILER_SUPPORTS_SSE2) # define __SSE__ 1 # define __SSE2__ 1 # endif