]> granicus.if.org Git - libvpx/commitdiff
vpx_subpixel_8t_intrin_avx2: tolerate unversioned clang
authorJames Zern <jzern@google.com>
Fri, 16 Sep 2016 03:40:21 +0000 (20:40 -0700)
committerJames Zern <jzern@google.com>
Fri, 16 Sep 2016 07:14:17 +0000 (07:14 +0000)
assume __clang_major__==0 has the latest version of
_mm256_broadcastsi128_si256. fixes builds with custom clang toolchains.

BUG=b/30970831

Change-Id: I90becd56278e4716bd46e2ba9d910af977e8dfa6

vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c

index 2b41d99e554054c4001710b9edf656282cdfe071..7c1ecc014812ae44278667fd7fb4eee84666865c 100644 (file)
@@ -36,11 +36,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) || \
-    (defined(__APPLE__) && defined(__apple_build_version__) &&               \
-     ((__clang_major__ == 4 && __clang_minor__ <= 2) ||                      \
+#if (__clang_major__ > 0 && __clang_major__ < 3) ||            \
+    (__clang_major__ == 3 && __clang_minor__ <= 3) ||          \
+    (defined(__APPLE__) && defined(__apple_build_version__) && \
+     ((__clang_major__ == 4 && __clang_minor__ <= 2) ||        \
       (__clang_major__ == 5 && __clang_minor__ == 0)))
-
 #define MM256_BROADCASTSI128_SI256(x) \
   _mm_broadcastsi128_si256((__m128i const *)&(x))
 #else  // clang > 3.3, and not 5.0 on macosx.