Fix avx builds on macosx with clang 5.0.
authorTom Finegan <tomfinegan@google.com>
Wed, 9 Apr 2014 01:32:19 +0000 (18:32 -0700)
committerTom Finegan <tomfinegan@google.com>
Wed, 9 Apr 2014 01:56:03 +0000 (18:56 -0700)
The macosx release of clang v5.0 identifies itself as:
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)

This version of clang uses the older _mm_broadcastsi128_si256, like
v3.3, as given away in the LLVM svn version above.

Change-Id: I4d6d59d5454efd57d2ae9e75f5eb7486af7cbd0c

vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c

index 7e9cc84..b84db97 100644 (file)
@@ -33,10 +33,11 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = {
 };
 
 #if defined(__clang__)
-# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ <= 3)
+# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ <= 3) || \
+      (defined(__APPLE__) && __clang_major__ == 5 && __clang_minor__ == 0)
 #  define MM256_BROADCASTSI128_SI256(x) \
        _mm_broadcastsi128_si256((__m128i const *)&(x))
-# else  // clang > 3.3
+# else  // clang > 3.3, and not 5.0 on macosx.
 #  define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x)
 # endif  // clang <= 3.3
 #elif defined(__GNUC__)