[X86][SSE] Add support for lowering shuffles to PACKSS/PACKUS

If the upper bits of a truncation shuffle patterns have at least the minimum number of sign/zero bits on their inputs then we can safely use PACKSS/PACKUS as shuffles.

Partial fix for https://bugs.llvm.org/show_bug.cgi?id=34773

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314788 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed