diff options
author | Craig Topper <craig.topper@gmail.com> | 2011-12-19 09:03:48 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2011-12-19 09:03:48 +0000 |
commit | 735ceaa4ccb60df5993245e645f7127bf4a4325f (patch) | |
tree | 0cecd3870604e5e73bcdfe04114ddb24be632cb1 /lib/Headers/avx2intrin.h | |
parent | 098eaffc0c1784567ddccfe6f976ced6e904552e (diff) |
Add AVX2 intrinsics for and, andn, or, and xor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Headers/avx2intrin.h')
-rw-r--r-- | lib/Headers/avx2intrin.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Headers/avx2intrin.h b/lib/Headers/avx2intrin.h index e4f1e14c90..df0450d7d1 100644 --- a/lib/Headers/avx2intrin.h +++ b/lib/Headers/avx2intrin.h @@ -124,6 +124,24 @@ _mm256_adds_epu16(__m256i a, __m256i b) (__m256i)__builtin_ia32_palignr256((__v32qi)__a, (__v32qi)__b, (n)); }) static __inline__ __m256i __attribute__((__always_inline__, __nodebug__)) +_mm256_and_si256(__m256i a, __m256i b) +{ + return a & b; +} + +static __inline__ __m256i __attribute__((__always_inline__, __nodebug__)) +_mm256_andnot_si256(__m256i a, __m256i b) +{ + return ~a & b; +} + +static __inline__ __m256i __attribute__((__always_inline__, __nodebug__)) +_mm256_or_si256(__m256i a, __m256i b) +{ + return a | b; +} + +static __inline__ __m256i __attribute__((__always_inline__, __nodebug__)) _mm256_sub_epi8(__m256i a, __m256i b) { return (__m256i)((__v32qi)a - (__v32qi)b); @@ -171,3 +189,8 @@ _mm256_subs_epu16(__m256i a, __m256i b) return (__m256i)__builtin_ia32_psubusw256((__v16hi)a, (__v16hi)b); } +static __inline__ __m256i __attribute__((__always_inline__, __nodebug__)) +_mm256_xor_si256(__m256i a, __m256i b) +{ + return a ^ b; +} |