From da188ebbbd4561178fe6c6b26772d29f1e407c47 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 20 Apr 2009 17:27:09 +0000 Subject: Revise my previous change 68996 as suggested by Duncan. llvm-svn: 69607 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index be0102c846a..33103cb9be5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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); } -- cgit v1.2.3