diff options
Diffstat (limited to 'lib/Headers/avx512bwintrin.h')
-rw-r--r-- | lib/Headers/avx512bwintrin.h | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/lib/Headers/avx512bwintrin.h b/lib/Headers/avx512bwintrin.h index a90a255376..723829647f 100644 --- a/lib/Headers/avx512bwintrin.h +++ b/lib/Headers/avx512bwintrin.h @@ -1,23 +1,9 @@ /*===------------- avx512bwintrin.h - AVX512BW intrinsics ------------------=== * * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ @@ -719,11 +705,7 @@ _mm512_maskz_adds_epu16 (__mmask32 __U, __m512i __A, __m512i __B) static __inline__ __m512i __DEFAULT_FN_ATTRS512 _mm512_avg_epu8 (__m512i __A, __m512i __B) { - typedef unsigned short __v64hu __attribute__((__vector_size__(128))); - return (__m512i)__builtin_convertvector( - ((__builtin_convertvector((__v64qu) __A, __v64hu) + - __builtin_convertvector((__v64qu) __B, __v64hu)) + 1) - >> 1, __v64qu); + return (__m512i)__builtin_ia32_pavgb512((__v64qi)__A, (__v64qi)__B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 @@ -746,11 +728,7 @@ _mm512_maskz_avg_epu8 (__mmask64 __U, __m512i __A, __m512i __B) static __inline__ __m512i __DEFAULT_FN_ATTRS512 _mm512_avg_epu16 (__m512i __A, __m512i __B) { - typedef unsigned int __v32su __attribute__((__vector_size__(128))); - return (__m512i)__builtin_convertvector( - ((__builtin_convertvector((__v32hu) __A, __v32su) + - __builtin_convertvector((__v32hu) __B, __v32su)) + 1) - >> 1, __v32hu); + return (__m512i)__builtin_ia32_pavgw512((__v32hi)__A, (__v32hi)__B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 @@ -1751,7 +1729,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_epi16 (void const *__P) { struct __loadu_epi16 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi16*)__P)->__v; } @@ -1777,7 +1755,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_epi8 (void const *__P) { struct __loadu_epi8 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi8*)__P)->__v; } @@ -1803,7 +1781,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_epi16 (void *__P, __m512i __A) { struct __storeu_epi16 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi16*)__P)->__v = __A; } @@ -1820,7 +1798,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_epi8 (void *__P, __m512i __A) { struct __storeu_epi8 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi8*)__P)->__v = __A; } |