Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1217)

Unified Diff: media/base/vector_math.cc

Issue 599693002: Only use custom SSE FMUL and FMAC with non-clang compilers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clang. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/vector_math.cc
diff --git a/media/base/vector_math.cc b/media/base/vector_math.cc
index 71721b6985898159d4b25d29d626e07a2a25d83c..578290538ac26cee8080b144a39124ae344f8646 100644
--- a/media/base/vector_math.cc
+++ b/media/base/vector_math.cc
@@ -13,8 +13,15 @@
// NaCl does not allow intrinsics.
#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL)
#include <xmmintrin.h>
+// Don't use custom SSE versions where the auto-vectorized C version performs
+// better, which is anywhere clang is used.
+#if !defined(__clang__)
#define FMAC_FUNC FMAC_SSE
#define FMUL_FUNC FMUL_SSE
+#else
+#define FMAC_FUNC FMAC_C
+#define FMUL_FUNC FMUL_C
+#endif
#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE
#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON)
#include <arm_neon.h>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698