Skip to content

Commit 502c437

Browse files
committed
Simplify loop
1 parent 9ca5da5 commit 502c437

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,8 +1461,9 @@ bool NVPTXDAGToDAGISel::tryStoreVector(SDNode *N) {
14611461

14621462
unsigned NumElts = getLoadStoreVectorNumElts(N);
14631463
SmallVector<SDValue, 16> Ops;
1464-
for (unsigned I : llvm::seq(NumElts))
1465-
Ops.append({N->getOperand(I + 1)});
1464+
// Append the operands from 1 to NumElts, inclusive
1465+
const SDUse *FirstStoredVal = N->ops().begin() + 1;
1466+
Ops.append(FirstStoredVal, FirstStoredVal + NumElts);
14661467
SDValue N2 = N->getOperand(NumElts + 1);
14671468
unsigned ToTypeWidth = TotalWidth / NumElts;
14681469

0 commit comments

Comments
 (0)