Skip to content

Commit fcf6dc3

Browse files
[AArch64] Construct SmallVector<SDValue> with ArrayRef (NFC) (#102713)
1 parent e9a47a6 commit fcf6dc3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,8 +1873,7 @@ void AArch64DAGToDAGISel::SelectDestructiveMultiIntrinsic(SDNode *N,
18731873
unsigned FirstVecIdx = HasPred ? 2 : 1;
18741874

18751875
auto GetMultiVecOperand = [=](unsigned StartIdx) {
1876-
SmallVector<SDValue, 4> Regs(N->op_begin() + StartIdx,
1877-
N->op_begin() + StartIdx + NumVecs);
1876+
SmallVector<SDValue, 4> Regs(N->ops().slice(StartIdx, NumVecs));
18781877
return createZMulTuple(Regs);
18791878
};
18801879

@@ -2135,8 +2134,7 @@ void AArch64DAGToDAGISel::SelectUnaryMultiIntrinsic(SDNode *N,
21352134
if (IsTupleInput) {
21362135
assert((NumInVecs == 2 || NumInVecs == 4) &&
21372136
"Don't know how to handle multi-register input!");
2138-
SmallVector<SDValue, 4> Regs(N->op_begin() + 1,
2139-
N->op_begin() + 1 + NumInVecs);
2137+
SmallVector<SDValue, 4> Regs(N->ops().slice(1, NumInVecs));
21402138
Ops.push_back(createZMulTuple(Regs));
21412139
} else {
21422140
// All intrinsic nodes have the ID as the first operand, hence the "1 + I".
@@ -2160,7 +2158,7 @@ void AArch64DAGToDAGISel::SelectStore(SDNode *N, unsigned NumVecs,
21602158

21612159
// Form a REG_SEQUENCE to force register allocation.
21622160
bool Is128Bit = VT.getSizeInBits() == 128;
2163-
SmallVector<SDValue, 4> Regs(N->op_begin() + 2, N->op_begin() + 2 + NumVecs);
2161+
SmallVector<SDValue, 4> Regs(N->ops().slice(2, NumVecs));
21642162
SDValue RegSeq = Is128Bit ? createQTuple(Regs) : createDTuple(Regs);
21652163

21662164
SDValue Ops[] = {RegSeq, N->getOperand(NumVecs + 2), N->getOperand(0)};
@@ -2398,7 +2396,7 @@ void AArch64DAGToDAGISel::SelectPostStoreLane(SDNode *N, unsigned NumVecs,
23982396
bool Narrow = VT.getSizeInBits() == 64;
23992397

24002398
// Form a REG_SEQUENCE to force register allocation.
2401-
SmallVector<SDValue, 4> Regs(N->op_begin() + 1, N->op_begin() + 1 + NumVecs);
2399+
SmallVector<SDValue, 4> Regs(N->ops().slice(1, NumVecs));
24022400

24032401
if (Narrow)
24042402
transform(Regs, Regs.begin(),

0 commit comments

Comments
 (0)