[X86] Enable use of avx512 saturating truncate instructions in more cases.
authorCraig Topper <craig.topper@intel.com>
Sun, 13 Oct 2019 19:07:28 +0000 (19:07 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 13 Oct 2019 19:07:28 +0000 (19:07 +0000)
commit25eb219959f7750e896e9ffab279cd2bc77478b9
treec078796ef5d9c273b81c24e4433235858f871f65
parent5d8870bc76538eaf8f58d6d40b8ed1c9e8c957fc
[X86] Enable use of avx512 saturating truncate instructions in more cases.

This enables use of the saturating truncate instructions when the
result type is less than 128 bits. It also enables the use of
saturating truncate instructions on KNL when the input is less
than 512 bits. We can do this by widening the input and then
extracting the result.

llvm-svn: 374731
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-trunc.ll
llvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
llvm/test/CodeGen/X86/masked_store_trunc_usat.ll
llvm/test/CodeGen/X86/vector-trunc-packus.ll
llvm/test/CodeGen/X86/vector-trunc-ssat.ll
llvm/test/CodeGen/X86/vector-trunc-usat.ll