]> granicus.if.org Git - llvm/commit
[X86] Turn v16i16->v16i8 truncate+store into a any_extend+truncstore if we avx512f...
authorCraig Topper <craig.topper@intel.com>
Sun, 23 Jun 2019 23:51:21 +0000 (23:51 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 23 Jun 2019 23:51:21 +0000 (23:51 +0000)
commit1cef718e0f1cd971b7a03a2652dd2cdec62ebfd8
tree49cbb722723ad504488cf79fb72739e6de3b2662
parent43f3f953950c4a51208ba96afda6b4fa1d83f5c8
[X86] Turn v16i16->v16i8 truncate+store into a any_extend+truncstore if we avx512f, but not avx512bw.

Ideally we'd be able to represent this truncate as a any_extend to
v16i32 and a truncate, but SelectionDAG doens't know how to not
fold those together.

We have isel patterns to use a vpmovzxwd+vpdmovdb for the truncate,
but we aren't able to simultaneously fold the load and the store
from the isel pattern. By pulling the truncate into the store we
can successfully hide it from the DAG combiner. Then we can isel
pattern match the truncstore and load+any_extend separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364163 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrAVX512.td
test/CodeGen/X86/shuffle-vs-trunc-512-widen.ll
test/CodeGen/X86/shuffle-vs-trunc-512.ll
test/CodeGen/X86/vector-trunc-widen.ll
test/CodeGen/X86/vector-trunc.ll