[VectorLegalizer] ExpandANY_EXTEND_VECTOR_INREG/ExpandZERO_EXTEND_VECTOR_INREG -...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 25 Jun 2019 11:31:37 +0000 (11:31 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 25 Jun 2019 11:31:37 +0000 (11:31 +0000)
commitb23c942ce4380295a0755237b3de468abd2b7337
tree6099acc700a3b8c3d16b79aa6572e15d34a704fc
parent4cf18c2849558d8aa0a8c3951b2532db18c0a65f
[VectorLegalizer] ExpandANY_EXTEND_VECTOR_INREG/ExpandZERO_EXTEND_VECTOR_INREG - widen source vector

The *_EXTEND_VECTOR_INREG opcodes were relaxed back around rL346784 to support source vector widths that are smaller than the output - it looks like the legalizers were never updated to account for this.

This patch inserts the smaller source vector into an undef vector of the same width of the result before performing the shuffle+bitcast to correctly handle this.

Part of the yak shaving to solve the crashes from rL364264 and rL364272

llvm-svn: 364295
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp