Skip to content

Commit 60cd76b

Browse files
[CodeGen] Construct SmallVector with ArrayRef (NFC) (llvm#143391)
1 parent 787efa7 commit 60cd76b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3562,9 +3562,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
35623562
unsigned Factor = Node->getNumOperands();
35633563
if (Factor <= 2 || !isPowerOf2_32(Factor))
35643564
break;
3565-
SmallVector<SDValue, 8> Ops;
3566-
for (SDValue Op : Node->ops())
3567-
Ops.push_back(Op);
3565+
SmallVector<SDValue, 8> Ops(Node->ops());
35683566
EVT VecVT = Node->getValueType(0);
35693567
SmallVector<EVT> HalfVTs(Factor / 2, VecVT);
35703568
// Deinterleave at Factor/2 so each result contains two factors interleaved:

0 commit comments

Comments
 (0)