From: Bruno Cardoso Lopes Date: Wed, 4 Aug 2010 22:56:42 +0000 (+0000) Subject: Logical AVX instrinsics can be matched directly, no need to use builtins here. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8727e514393e036c88497a15ae4f61e3a4a28b3;p=clang Logical AVX instrinsics can be matched directly, no need to use builtins here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110271 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Headers/avxintrin.h b/lib/Headers/avxintrin.h index df57ad2221..ce7418997b 100644 --- a/lib/Headers/avxintrin.h +++ b/lib/Headers/avxintrin.h @@ -169,49 +169,49 @@ _mm256_round_ps(__m256 v, const int m) static __inline __m256d __attribute__((__always_inline__, __nodebug__)) _mm256_and_pd(__m256d a, __m256d b) { - return (__m256d)__builtin_ia32_andpd256((__v4df)a, (__v4df)b); + return (__m256d)((__v4df)a & (__v4df)b); } static __inline __m256 __attribute__((__always_inline__, __nodebug__)) _mm256_and_ps(__m256 a, __m256 b) { - return (__m256)__builtin_ia32_andps256((__v8sf)a, (__v8sf)b); + return (__m256)((__v8sf)a & (__v8sf)b); } static __inline __m256d __attribute__((__always_inline__, __nodebug__)) _mm256_andnot_pd(__m256d a, __m256d b) { - return (__m256d)__builtin_ia32_andnpd256((__v4df)a, (__v4df)b); + return (__m256d)(~(__v4df)a & (__v4df)b); } static __inline __m256 __attribute__((__always_inline__, __nodebug__)) _mm256_andnot_ps(__m256 a, __m256 b) { - return (__m256)__builtin_ia32_andnps256((__v8sf)a, (__v8sf)b); + return (__m256)(~(__v8sf)a & (__v8sf)b); } static __inline __m256d __attribute__((__always_inline__, __nodebug__)) _mm256_or_pd(__m256d a, __m256d b) { - return (__m256d)__builtin_ia32_orpd256((__v4df)a, (__v4df)b); + return (__m256d)((__v4df)a | (__v4df)b); } static __inline __m256 __attribute__((__always_inline__, __nodebug__)) _mm256_or_ps(__m256 a, __m256 b) { - return (__m256)__builtin_ia32_orps256((__v8sf)a, (__v8sf)b); + return (__m256)((__v8sf)a | (__v8sf)b); } static __inline __m256d __attribute__((__always_inline__, __nodebug__)) _mm256_xor_pd(__m256d a, __m256d b) { - return (__m256d)__builtin_ia32_xorpd256((__v4df)a, (__v4df)b); + return (__m256d)((__v4df)a ^ (__v4df)b); } static __inline __m256 __attribute__((__always_inline__, __nodebug__)) _mm256_xor_ps(__m256 a, __m256 b) { - return (__m256)__builtin_ia32_xorps256((__v8sf)a, (__v8sf)b); + return (__m256)((__v8sf)a ^ (__v8sf)b); } /* Horizontal arithmetic */