diff options
author | Craig Topper <craig.topper@gmail.com> | 2020-01-22 15:59:14 -0600 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-02-12 14:49:56 +0100 |
commit | 533d98bdced6f75d0c7e4f42476b3bc873a113b6 (patch) | |
tree | 537627d31bf0fb1b5d0f4a2816fdb0d8e3f16794 | |
parent | 4eb45a05a78f7c80bbec0453bc225deebec06209 (diff) | |
download | bcm5719-llvm-533d98bdced6f75d0c7e4f42476b3bc873a113b6.tar.gz bcm5719-llvm-533d98bdced6f75d0c7e4f42476b3bc873a113b6.zip |
[X86] Cast to __v4hi instead of __m64 in the implementation of _mm_extract_pi16 and _mm_insert_pi16.
__m64 is a vector of 1 long long. But the builtins these intrinsics
are calling expect a vector of 4 shorts.
Fixes PR44589
(cherry picked from commit 16b9410caa35da976fa5f3cf6dd3d6f3776d51ca)
-rw-r--r-- | clang/lib/Headers/xmmintrin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Headers/xmmintrin.h b/clang/lib/Headers/xmmintrin.h index 0e61eab44ae..9b8de63f04d 100644 --- a/clang/lib/Headers/xmmintrin.h +++ b/clang/lib/Headers/xmmintrin.h @@ -2181,7 +2181,7 @@ void _mm_sfence(void); /// 3: Bits [63:48] are copied to the destination. /// \returns A 16-bit integer containing the extracted 16 bits of packed data. #define _mm_extract_pi16(a, n) \ - (int)__builtin_ia32_vec_ext_v4hi((__m64)a, (int)n) + (int)__builtin_ia32_vec_ext_v4hi((__v4hi)a, (int)n) /// Copies data from the 64-bit vector of [4 x i16] to the destination, /// and inserts the lower 16-bits of an integer operand at the 16-bit offset @@ -2212,7 +2212,7 @@ void _mm_sfence(void); /// \returns A 64-bit integer vector containing the copied packed data from the /// operands. #define _mm_insert_pi16(a, d, n) \ - (__m64)__builtin_ia32_vec_set_v4hi((__m64)a, (int)d, (int)n) + (__m64)__builtin_ia32_vec_set_v4hi((__v4hi)a, (int)d, (int)n) /// Compares each of the corresponding packed 16-bit integer values of /// the 64-bit integer vectors, and writes the greater value to the |