diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index d72be359867ca..8322d243b5bc3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -24741,10 +24741,8 @@ static SDValue combineConcatVectorOfShuffleAndItsOperands( // We are going to pad the shuffle operands, so any indice, that was picking // from the second operand, must be adjusted. - SmallVector AdjustedMask; - AdjustedMask.reserve(SVN->getMask().size()); + SmallVector AdjustedMask(SVN->getMask()); assert(SVN->getOperand(1).isUndef() && "Expected unary shuffle!"); - append_range(AdjustedMask, SVN->getMask()); // Identity masks for the operands of the (padded) shuffle. SmallVector IdentityMask(2 * OpVT.getVectorNumElements());