[X86] Allow combineTruncateWithSat to use pack instructions for i16->i8 without AVX512BW.
authorCraig Topper <craig.topper@intel.com>
Mon, 12 Aug 2019 22:18:23 +0000 (22:18 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 12 Aug 2019 22:18:23 +0000 (22:18 +0000)
commite07e593782b2d165ebfef3cac2999e74e42d20a6
tree894c409bac5e3685143a79276d9ae5de2eaa9954
parentacc8079f8e6ff19fca4db46706d4b334a9094eba
[X86] Allow combineTruncateWithSat to use pack instructions for i16->i8 without AVX512BW.

We need AVX512BW to be able to truncate an i16 vector. If we don't
have that we have to extend i16->i32, then trunc, i32->i8. But we
won't be able to remove the min/max if we do that. At least not
without more special handling.

llvm-svn: 368623
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/vector-trunc-packus.ll
llvm/test/CodeGen/X86/vector-trunc-ssat.ll