summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringconverter.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-07-01 14:02:49 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2022-07-13 16:12:15 +0200
commit00b46bf4f82a2c557e7628c417c6d772f38143a3 (patch)
tree058bbf0ca2f0d7c9783dc990ceda257f38b2110e /src/corelib/text/qstringconverter.cpp
parent92e696b4bad52c40c6cdc1c5bf7c0c0ea8a2b283 (diff)
Unicode conversion: Skip superfluous check for QT_COMPILER_SUPPORTS_SSE2
We already check for __SSE2__, which gets undefined when __SSE2__ is not set. Moreover, we want to use the intrinsics without a runtime check there, so checking for __SSE2__ is the correct thing to do. Change-Id: I7f8610e2927650b439c3697585234b843e345e4c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringconverter.cpp')
-rw-r--r--src/corelib/text/qstringconverter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp
index 4c94de029e..0217dc1fe8 100644
--- a/src/corelib/text/qstringconverter.cpp
+++ b/src/corelib/text/qstringconverter.cpp
@@ -40,8 +40,7 @@ enum { Endian = 0, Data = 1 };
static const uchar utf8bom[] = { 0xef, 0xbb, 0xbf };
-#if (defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)) \
- || defined(__ARM_NEON__)
+#if defined(__SSE2__) || defined(__ARM_NEON__)
static Q_ALWAYS_INLINE uint qBitScanReverse(unsigned v) noexcept
{
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L
@@ -57,7 +56,7 @@ static Q_ALWAYS_INLINE uint qBitScanReverse(unsigned v) noexcept
}
#endif
-#if defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)
+#if defined(__SSE2__)
static inline bool simdEncodeAscii(uchar *&dst, const char16_t *&nextAscii, const char16_t *&src, const char16_t *end)
{
// do sixteen characters at a time