[PATCH] D71812: [NVPTX] Fixes -Wrange-loop-analysis warnings

Mark de Wever via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 08:25:16 PST 2019


Mordante created this revision.
Mordante added reviewers: jholewinski, aaron.ballman, xbolva00.
Mordante added a project: LLVM.
Herald added a subscriber: hiraditya.

This avoids new warnings due to D68912 <https://reviews.llvm.org/D68912> adds -Wrange-loop-analysis to -Wall.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71812

Files:
  llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp


Index: llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
+++ llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
@@ -612,7 +612,7 @@
 
   // 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 (const auto U : Vector.getNode()->uses()) {
     if (U->getOpcode() != ISD::EXTRACT_VECTOR_ELT)
       continue;
     if (U->getOperand(0) != Vector)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71812.235056.patch
Type: text/x-patch
Size: 557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191222/7dcbbde9/attachment.bin>


More information about the llvm-commits mailing list