[X86] Add support for turning vXi1 shuffles into KSHIFTL/KSHIFTR.
authorCraig Topper <craig.topper@intel.com>
Fri, 31 Aug 2018 17:17:21 +0000 (17:17 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 31 Aug 2018 17:17:21 +0000 (17:17 +0000)
commitb7bb9f0078e27bf39d73aa4a5ba31e9e02087216
tree0ebba0011b1a7f6b5c1003a42b5dd5d418284d40
parent5b7548c65307e90db7278b0251e8fef095086ad6
[X86] Add support for turning vXi1 shuffles into KSHIFTL/KSHIFTR.

This patch recognizes shuffles that shift elements and fill with zeros. I've copied and modified the shift matching code we use for normal vector registers to do this. I'm not sure if there's a good way to share more of this code without making the existing function more complex than it already is.

This will be used to enable kshift intrinsics in clang.

Differential Revision: https://reviews.llvm.org/D51401

llvm-svn: 341227
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-skx-insert-subvec.ll
llvm/test/CodeGen/X86/kshift.ll