Fix a DAG combiner assertion failure when constant folding BUILD_VECTORS.
authorBob Wilson <bob.wilson@apple.com>
Tue, 18 Oct 2011 17:34:47 +0000 (17:34 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 18 Oct 2011 17:34:47 +0000 (17:34 +0000)
commitdb2b18febaea04d01b3dcb24fc44d5be7bd27a00
treea0c97b10dc98fcc7d0cfed673c0d3fb733d10886
parent630243a8c2d40df137b64246b7ed4363962fd9b4
Fix a DAG combiner assertion failure when constant folding BUILD_VECTORS.

svn r139159 caused SelectionDAG::getConstant() to promote BUILD_VECTOR operands
with illegal types, even before type legalization.  For this testcase, that led
to one BUILD_VECTOR with i16 operands and another with promoted i32 operands,
which triggered the assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142370 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/ARM/vector-DAGCombine.ll