Skip to content

Commit bc19e50

Browse files
[CodeGen] Construct SmallVector with ArrayRef (NFC)
Note that we can drop the call to reserve because the constructor that takes ArrayRef calls append, which in turn calls reserve.
1 parent 11857be commit bc19e50

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24741,10 +24741,8 @@ static SDValue combineConcatVectorOfShuffleAndItsOperands(
2474124741

2474224742
// We are going to pad the shuffle operands, so any indice, that was picking
2474324743
// from the second operand, must be adjusted.
24744-
SmallVector<int, 16> AdjustedMask;
24745-
AdjustedMask.reserve(SVN->getMask().size());
24744+
SmallVector<int, 16> AdjustedMask(SVN->getMask());
2474624745
assert(SVN->getOperand(1).isUndef() && "Expected unary shuffle!");
24747-
append_range(AdjustedMask, SVN->getMask());
2474824746

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

0 commit comments

Comments
 (0)