[llvm] 31262d6 - [NVPTX] Fixes -Wrange-loop-analysis warnings
Mark de Wever via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 22 10:28:35 PST 2019
Author: Mark de Wever
Date: 2019-12-22T19:27:44+01:00
New Revision: 31262d6722c7ae6a9966a76064af43e5b3a8df71
URL: https://github.com/llvm/llvm-project/commit/31262d6722c7ae6a9966a76064af43e5b3a8df71
DIFF: https://github.com/llvm/llvm-project/commit/31262d6722c7ae6a9966a76064af43e5b3a8df71.diff
LOG: [NVPTX] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Also removed the top-level const as requested by Aaron Ballman in similar
patches.
Differential Revision: https://reviews.llvm.org/D71812
Added:
Modified:
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
index ca3eda284850..4296eca6a8df 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
@@ -612,7 +612,7 @@ bool NVPTXDAGToDAGISel::tryEXTRACT_VECTOR_ELEMENT(SDNode *N) {
// Find and record all uses of this vector that extract element 0 or 1.
SmallVector<SDNode *, 4> E0, E1;
- for (const auto &U : Vector.getNode()->uses()) {
+ for (auto U : Vector.getNode()->uses()) {
if (U->getOpcode() != ISD::EXTRACT_VECTOR_ELT)
continue;
if (U->getOperand(0) != Vector)
More information about the llvm-commits
mailing list