Revise my previous change 68996 as suggested by Duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson
2009-04-20 17:27:09 +00:00
parent c4f718a3a7
commit c885165e66
4 changed files with 11 additions and 16 deletions

View File

@@ -2556,7 +2556,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, MVT VT,
if (Elt.getValueType() != VT) {
// If the vector element type is not legal, the BUILD_VECTOR operands
// are promoted and implicitly truncated. Make that explicit here.
assert(Elt.getValueType() == TLI.getTypeToTransformTo(VT) &&
assert(VT.isInteger() && Elt.getValueType().isInteger() &&
VT.bitsLE(Elt.getValueType()) &&
"Bad type for BUILD_VECTOR operand");
Elt = getNode(ISD::TRUNCATE, DL, VT, Elt);
}