diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index ddb12a101e02c..412e1de9fc41c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -6032,6 +6032,17 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, if (N1.getValueType().getScalarType() == MVT::i1) return getNode(ISD::VECREDUCE_AND, DL, VT, N1); break; + case ISD::SPLAT_VECTOR: + assert(VT.isVector() && "Wrong return type!"); + // FIXME: Hexagon uses i32 scalar for a floating point zero vector so allow + // that for now. + assert((VT.getVectorElementType() == N1.getValueType() || + (VT.isFloatingPoint() && N1.getValueType() == MVT::i32) || + (VT.getVectorElementType().isInteger() && + N1.getValueType().isInteger() && + VT.getVectorElementType().bitsLE(N1.getValueType()))) && + "Wrong operand type!"); + break; } SDNode *N;