--- src/corelib/tools/qsimd_p.h.orig	2016-12-01 01:17:04.000000000 -0700
+++ src/corelib/tools/qsimd_p.h	2021-01-12 23:42:29.000000000 -0600
@@ -465,7 +465,7 @@
 #define qCpuHasFeature(feature)     ((qCompilerCpuFeatures & (Q_UINT64_C(1) << CpuFeature ## feature)) \
                                      || (qCpuFeatures() & (Q_UINT64_C(1) << CpuFeature ## feature)))
 
-#if QT_HAS_BUILTIN(__builtin_clz) && QT_HAS_BUILTIN(__builtin_ctz) && defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+#if QT_HAS_BUILTIN(__builtin_clz) && QT_HAS_BUILTIN(__builtin_ctz) && (defined(Q_CC_CLANG) && !defined(_bit_scan_reverse)) && !defined(Q_CC_INTEL)
 static Q_ALWAYS_INLINE unsigned _bit_scan_reverse(unsigned val)
 {
     Q_ASSERT(val != 0); // if val==0, the result is undefined.
@@ -503,7 +503,7 @@
     _BitScanForward(&result, val);
     return result;
 }
-#  elif (defined(Q_CC_CLANG) || (defined(Q_CC_GNU) && Q_CC_GNU < 405)) \
+#  elif ((defined(Q_CC_CLANG) && !defined(_bit_scan_reverse)) || (!defined(Q_CC_CLANG) && defined(Q_CC_GNU) && Q_CC_GNU < 405)) \
     && !defined(Q_CC_INTEL)
 // Clang is missing the intrinsic for _bit_scan_reverse
 // GCC only added it in version 4.5
