r270970 - [AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not be multiplied by 8.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu May 26 23:59:44 PDT 2016


Author: ctopper
Date: Fri May 27 01:59:39 2016
New Revision: 270970

URL: http://llvm.org/viewvc/llvm-project?rev=270970&view=rev
Log:
[AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not be multiplied by 8.

The 512-bit version was fixed recently but this was missed.

Modified:
    cfe/trunk/lib/Headers/avx512vlbwintrin.h

Modified: cfe/trunk/lib/Headers/avx512vlbwintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vlbwintrin.h?rev=270970&r1=270969&r2=270970&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vlbwintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vlbwintrin.h Fri May 27 01:59:39 2016
@@ -3338,25 +3338,25 @@ _mm256_mask_permutexvar_epi16 (__m256i _
 
 #define _mm_mask_alignr_epi8(W, U, A, B, N) __extension__ ({ \
   (__m128i)__builtin_ia32_palignr128_mask((__v16qi)(__m128i)(A), \
-                                          (__v16qi)(__m128i)(B), (int)(N) * 8, \
+                                          (__v16qi)(__m128i)(B), (int)(N), \
                                           (__v16qi)(__m128i)(W), \
                                           (__mmask16)(U)); })
 
 #define _mm_maskz_alignr_epi8(U, A, B, N) __extension__ ({ \
   (__m128i)__builtin_ia32_palignr128_mask((__v16qi)(__m128i)(A), \
-                                          (__v16qi)(__m128i)(B), (int)(N) * 8, \
+                                          (__v16qi)(__m128i)(B), (int)(N), \
                                           (__v16qi)_mm_setzero_si128(), \
                                           (__mmask16)(U)); })
 
 #define _mm256_mask_alignr_epi8(W, U, A, B, N) __extension__ ({ \
   (__m256i)__builtin_ia32_palignr256_mask((__v32qi)(__m256i)(A), \
-                                          (__v32qi)(__m256i)(B), (int)(N) * 8, \
+                                          (__v32qi)(__m256i)(B), (int)(N), \
                                           (__v32qi)(__m256i)(W), \
                                           (__mmask32)(U)); })
 
 #define _mm256_maskz_alignr_epi8(U, A, B, N) __extension__ ({ \
   (__m256i)__builtin_ia32_palignr256_mask((__v32qi)(__m256i)(A), \
-                                          (__v32qi)(__m256i)(B), (int)(N) * 8, \
+                                          (__v32qi)(__m256i)(B), (int)(N), \
                                           (__v32qi)_mm256_setzero_si256(), \
                                           (__mmask32)(U)); })
 




More information about the cfe-commits mailing list