[PATCH] D18933: [Clang][AVX512][BuiltIn] Adding avx512 ( vperm{i|t}2var, vpermil{var}{ps|pd}{256|512} ) builtin to clang.

michael zuckerman via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 9 13:23:28 PDT 2016


m_zuckerman marked 2 inline comments as done.

================
Comment at: test/CodeGen/avx512f-builtins.c:2606
@@ +2605,3 @@
+  // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512
+  return _mm512_permute_pd(__X, 4); 
+}
----------------
delena wrote:
> What is 4? Current?
Not is an imm8 . All permute function gets imm8 argument as the last argument . 

  

================
Comment at: test/CodeGen/avx512vl-builtins.c:4302
@@ +4301,3 @@
+  // CHECK: @llvm.x86.avx512.mask.vpermil.pd
+  return _mm_mask_permute_pd(__W, __U, __X, 2); 
+}
----------------
This is not a round mode, this function get imm8 

"Shuffle double-precision (64-bit) floating-point elements in a using the control in imm8, and store the results in dst using writemask k (elements are copied from src when the corresponding mask bit is not set)." 

 This was a mistake in replacing  4 in  non-current mode.  



http://reviews.llvm.org/D18933





More information about the llvm-commits mailing list