diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-04-17 05:16:56 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-04-17 05:16:56 +0000 |
commit | 49a110db4c43835681bb89671f8f73c8d8c7c28c (patch) | |
tree | 96b046cbd74cddee88b5bba38636ed3cae9f3de4 /lib/Headers/avxintrin.h | |
parent | 7d6c8a13ecfcf11392541bc6d4270c019af5fdbe (diff) |
Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. Unfortunately, these instructions have behavior that can't be modeled with shuffle vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Headers/avxintrin.h')
-rw-r--r-- | lib/Headers/avxintrin.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/lib/Headers/avxintrin.h b/lib/Headers/avxintrin.h index 7a0ec3fbd6..ee7f83572f 100644 --- a/lib/Headers/avxintrin.h +++ b/lib/Headers/avxintrin.h @@ -289,37 +289,17 @@ _mm256_permutevar_ps(__m256 a, __m256i c) #define _mm256_permute2f128_pd(V1, V2, M) __extension__ ({ \ __m256d __V1 = (V1); \ __m256d __V2 = (V2); \ - (__m256d)__builtin_shufflevector((__v4df)__V1, (__v4df)__V2, \ - ((M) & 0x3) * 2, \ - ((M) & 0x3) * 2 + 1, \ - (((M) & 0x30) >> 4) * 2, \ - (((M) & 0x30) >> 4) * 2 + 1); }) + (__m256d)__builtin_ia32_vperm2f128_pd256((__v4df)__V1, (__v4df)__V2, (M)); }) #define _mm256_permute2f128_ps(V1, V2, M) __extension__ ({ \ __m256 __V1 = (V1); \ __m256 __V2 = (V2); \ - (__m256)__builtin_shufflevector((__v8sf)__V1, (__v8sf)__V2, \ - ((M) & 0x3) * 4, \ - ((M) & 0x3) * 4 + 1, \ - ((M) & 0x3) * 4 + 2, \ - ((M) & 0x3) * 4 + 3, \ - (((M) & 0x30) >> 4) * 4, \ - (((M) & 0x30) >> 4) * 4 + 1, \ - (((M) & 0x30) >> 4) * 4 + 2, \ - (((M) & 0x30) >> 4) * 4 + 3); }) + (__m256)__builtin_ia32_vperm2f128_ps256((__v8sf)__V1, (__v8sf)__V2, (M)); }) #define _mm256_permute2f128_si256(V1, V2, M) __extension__ ({ \ __m256i __V1 = (V1); \ __m256i __V2 = (V2); \ - (__m256i)__builtin_shufflevector((__v8si)__V1, (__v8si)__V2, \ - ((M) & 0x3) * 4, \ - ((M) & 0x3) * 4 + 1, \ - ((M) & 0x3) * 4 + 2, \ - ((M) & 0x3) * 4 + 3, \ - (((M) & 0x30) >> 4) * 4, \ - (((M) & 0x30) >> 4) * 4 + 1, \ - (((M) & 0x30) >> 4) * 4 + 2, \ - (((M) & 0x30) >> 4) * 4 + 3); }) + (__m256i)__builtin_ia32_vperm2f128_si256((__v8si)__V1, (__v8si)__V2, (M)); }) /* Vector Blend */ #define _mm256_blend_pd(V1, V2, M) __extension__ ({ \ |