[llvm] 86c3825 - [Target] Construct SmallVector with ArrayRef (NFC) (#134019)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 1 21:59:22 PDT 2025
Author: Kazu Hirata
Date: 2025-04-01T21:59:19-07:00
New Revision: 86c382514e68b9b58a6cad266d99ca0a1ba1c856
URL: https://github.com/llvm/llvm-project/commit/86c382514e68b9b58a6cad266d99ca0a1ba1c856
DIFF: https://github.com/llvm/llvm-project/commit/86c382514e68b9b58a6cad266d99ca0a1ba1c856.diff
LOG: [Target] Construct SmallVector with ArrayRef (NFC) (#134019)
Added:
Modified:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index e2ce5e4fc17e1..5ed14cd21840c 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -14992,8 +14992,7 @@ SDValue PPCTargetLowering::DAGCombineExtBoolTrunc(SDNode *N,
}
}
- SmallVector<SDValue, 3> Ops(PromOp.getNode()->op_begin(),
- PromOp.getNode()->op_end());
+ SmallVector<SDValue, 3> Ops(PromOp.getNode()->ops());
// If this node has constant inputs, then they'll need to be promoted here.
for (unsigned i = 0; i < 2; ++i) {
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 0dc62ef04ec0f..967a6cf82433f 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -17787,8 +17787,7 @@ static SDValue performINSERT_VECTOR_ELTCombine(SDNode *N, SelectionDAG &DAG,
ConcatOp = DAG.getNode(ISD::INSERT_VECTOR_ELT, DL, ConcatVT,
ConcatOp, InVal, NewIdx);
- SmallVector<SDValue> ConcatOps;
- ConcatOps.append(InVec->op_begin(), InVec->op_end());
+ SmallVector<SDValue> ConcatOps(InVec->ops());
ConcatOps[ConcatOpIdx] = ConcatOp;
return DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, ConcatOps);
}
More information about the llvm-commits
mailing list