Skip to content

Commit 81b4fc2

Browse files
[CodeGen] Construct SmallVector with ArrayRef (NFC) (llvm#135930)
Note that we can drop the call to reserve because the constructor that takes ArrayRef calls append, which in turn calls reserve.
1 parent aca710a commit 81b4fc2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -24747,10 +24747,8 @@ static SDValue combineConcatVectorOfShuffleAndItsOperands(
2474724747

2474824748
// We are going to pad the shuffle operands, so any indice, that was picking
2474924749
// from the second operand, must be adjusted.
24750-
SmallVector<int, 16> AdjustedMask;
24751-
AdjustedMask.reserve(SVN->getMask().size());
24750+
SmallVector<int, 16> AdjustedMask(SVN->getMask());
2475224751
assert(SVN->getOperand(1).isUndef() && "Expected unary shuffle!");
24753-
append_range(AdjustedMask, SVN->getMask());
2475424752

2475524753
// Identity masks for the operands of the (padded) shuffle.
2475624754
SmallVector<int, 32> IdentityMask(2 * OpVT.getVectorNumElements());

0 commit comments

Comments
 (0)