[PATCH] D39719: [X86][AVX512] lowering kunpack intrinsic - clang part
    jina via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Nov  7 07:37:05 PST 2017
    
    
  
jina.nahias added inline comments.
================
Comment at: lib/Headers/avx512bwintrin.h:2045
 {
-  return (__mmask64) __builtin_ia32_kunpckdi ((__mmask64) __A,
-                (__mmask64) __B);
+  return (__mmask64)  (( __B  & 0xFFFFFFFF) | ((__mmask64) __A << 32));
 }
----------------
RKSimon wrote:
> Is this right? The Intel docs says it should be:
> ```
> k[31:0] := a[31:0]
> k[63:32] := b[31:0]
> k[MAX:64] := 0
> ```
> 
> Also, is the cast on __A necessary?
> 
> Same for the others.
you are right,  i fixed it.
https://reviews.llvm.org/D39719
    
    
More information about the cfe-commits
mailing list