]> granicus.if.org Git - llvm/commit
[X86][SSE] Lower 128-bit vectors to SIGN/ZERO_EXTEND_VECTOR_IN_REG ops
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 5 Mar 2017 09:57:20 +0000 (09:57 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 5 Mar 2017 09:57:20 +0000 (09:57 +0000)
commitca6750e3d5bce3c26e3d1244997600ff07d0be71
tree3c6d9dde2472b50c0ce470834a080d702231c3ac
parentd2a4d59de7c081b39033735100f7f82b8b12d0a5
[X86][SSE] Lower 128-bit vectors to SIGN/ZERO_EXTEND_VECTOR_IN_REG ops

As described on PR31712, we miss a variety of legalization combines because we lower these to X86ISD::VSEXT/VZEXT despite them having the same functionality. This patch makes 128-bit (SSE41) SIGN/ZERO_EXTEND_VECTOR_IN_REG ops legal, adds the necessary tablegen plumbing and uses a helper 'getExtendInVec' to decide when to use SIGN/ZERO_EXTEND_VECTOR_IN_REG or VSEXT/VZEXT.

We're missing a couple of shuffle combines that will be added in a future patch for review.

Later patches can then support the AVX2 cases as a mixture of SIGN/ZERO_EXTEND and SIGN/ZERO_EXTEND_VECTOR_IN_REG, and then finally deal with the AVX512 cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296985 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/Target/TargetSelectionDAG.td
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/2011-10-19-widen_vselect.ll
test/CodeGen/X86/2011-10-21-widen-cmp.ll
test/CodeGen/X86/combine-shl.ll
test/CodeGen/X86/known-bits-vector.ll
test/CodeGen/X86/pmul.ll
test/CodeGen/X86/vec_cast2.ll
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vector-zext.ll