[llvm] r370197 - [DAGCombine] Fix cppcheck shadow variable warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 05:48:41 PDT 2019
Author: rksimon
Date: Wed Aug 28 05:48:41 2019
New Revision: 370197
URL: http://llvm.org/viewvc/llvm-project?rev=370197&view=rev
Log:
[DAGCombine] Fix cppcheck shadow variable warning. NFCI.
We already have an outer Ops variable.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=370197&r1=370196&r2=370197&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Aug 28 05:48:41 2019
@@ -19552,14 +19552,14 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNo
TLI.isOperationLegalOrCustomOrPromote(Opcode, NarrowVT)) {
SDLoc DL(N);
unsigned NumOperands = LHS.getNumOperands();
- SmallVector<SDValue, 4> Ops;
+ SmallVector<SDValue, 4> ConcatOps;
for (unsigned i = 0; i != NumOperands; ++i) {
// This constant fold for operands 1 and up.
- Ops.push_back(DAG.getNode(Opcode, DL, NarrowVT, LHS.getOperand(i),
- RHS.getOperand(i)));
+ ConcatOps.push_back(DAG.getNode(Opcode, DL, NarrowVT, LHS.getOperand(i),
+ RHS.getOperand(i)));
}
- return DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Ops);
+ return DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, ConcatOps);
}
}
More information about the llvm-commits
mailing list