]> granicus.if.org Git - llvm/commit
[X86] Add a DAG combine to transform (i8 (bitcast (v8i1 (extract_subvector (v16i1...
authorCraig Topper <craig.topper@intel.com>
Tue, 20 Aug 2019 20:20:04 +0000 (20:20 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 20 Aug 2019 20:20:04 +0000 (20:20 +0000)
commit1ecdae15ceed55b7f1b0b1feeb8ba059ea585b85
tree6f2619387e21036f8730519e6d9d46f58748f577
parent351e42b86e441b99b73b32998f3297148ae69a03
[X86] Add a DAG combine to transform (i8 (bitcast (v8i1 (extract_subvector (v16i1 X), 0)))) -> (i8 (trunc (i16 (bitcast (v16i1 X))))) on KNL target

Without AVX512DQ we don't have KMOVB so we can't really copy 8-bits of a k-register to a GPR. We have to copy 16 bits instead. We do this even if the DAG copy is from v8i1->v16i1. If we detect the (i8 (bitcast (v8i1 (extract_subvector (v16i1 X), 0)))) we should rewrite the types to match the copy we do support. By doing this, we can help known bits to propagate without losing the upper 8 bits of the input to the extract_subvector. This allows some zero extends to be removed since we have an isel pattern to use kmovw for (zero_extend (i16 (bitcast (v16i1 X))).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369434 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx512-intrinsics.ll
test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
test/CodeGen/X86/avx512vlcd-intrinsics-fast-isel.ll