[PATCH] D42016: [X86] Implement old kunpck intrinsics using vector ops on vXi1 instead of integer shift/and/or

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 16:02:45 PST 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, zvi, jina.nahias.

kunpck intrinsics were removed in favor of native IR a few months ago. The implementation lowers them as by operation on the integer types passed to the intrinsic and then just shifting, masking, and oring them together. A special X86 DAG combine was added to recognize this patter and turn it into a concat_vector operation.

I think it makes more sense to keep the IR implementation closer to vector operations on vXi1. Given that we expect these builtins to be used around other builtins that operate on k-registers which we try to represent in IR with vXi1. InstCombine should be able to get rid of the bitcasts between integers and vXi1 leaving only the vector operations.

I'll post an llvm patch for the autoupgrade for this as well.


https://reviews.llvm.org/D42016

Files:
  lib/CodeGen/CGBuiltin.cpp
  lib/Headers/avx512bwintrin.h
  lib/Headers/avx512fintrin.h
  test/CodeGen/avx512bw-builtins.c
  test/CodeGen/avx512f-builtins.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42016.129723.patch
Type: text/x-patch
Size: 7770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180113/0286113c/attachment.bin>


More information about the llvm-commits mailing list