]> granicus.if.org Git - llvm/commit
[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)
commit62ea4baf5fa2d922e06e01c93804a33db22fee5d
tree758f1f771acc372bc1f1cbc682f7b7900ee91aa6
parent34aa0a38a60f1304d9790512fd42acc8ec6d052e
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368623 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx512-trunc.ll
test/CodeGen/X86/masked_store_trunc_ssat.ll
test/CodeGen/X86/vector-trunc-packus.ll
test/CodeGen/X86/vector-trunc-ssat.ll