Skip to content

Commit

Permalink
[NVPTX] Fixes -Wrange-loop-analysis warnings
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mordante committed Dec 22, 2019
1 parent 1b344e7 commit 31262d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 31262d6

Please sign in to comment.