WidenVecRes_BUILD_VECTOR must use the first operand's type
authorHal Finkel <hfinkel@anl.gov>
Tue, 9 Jul 2013 18:55:10 +0000 (18:55 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 9 Jul 2013 18:55:10 +0000 (18:55 +0000)
commitb9c8c40acbe120ebf44d2a81382ceee100bcd331
treec0c5476392e8c6b7b41750a3cb287f4c67aa7956
parent7c2d8f7b5ea1d0abaed1176f87ea2509e65e82be
WidenVecRes_BUILD_VECTOR must use the first operand's type

Because integer BUILD_VECTOR operands may have a larger type than the result's
vector element type, and all operands must have the same type, when widening a
BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
rather must use the type of the existing operands.

Another bug found by llvm-stress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185960 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/PowerPC/bv-widen-undef.ll [new file with mode: 0644]