Commit f600b50a authored by Tom Finegan's avatar Tom Finegan
Browse files

Fix avx builds on macosx with clang 5.0.

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
Showing with 3 additions and 2 deletions
...@@ -33,10 +33,11 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = { ...@@ -33,10 +33,11 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = {
}; };
#if defined(__clang__) #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) \ # define MM256_BROADCASTSI128_SI256(x) \
_mm_broadcastsi128_si256((__m128i const *)&(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) # define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x)
# endif // clang <= 3.3 # endif // clang <= 3.3
#elif defined(__GNUC__) #elif defined(__GNUC__)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment