[PATCH] D71811: [PowerPC] Fixes -Wrange-loop-analysis warnings
Mark de Wever via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 22 08:16:15 PST 2019
Mordante created this revision.
Mordante added reviewers: hfinkel, aaron.ballman, xbolva00.
Mordante added a project: LLVM.
Herald added subscribers: shchenz, jsji, kbarton, hiraditya, nemanjai.
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/D71811
Files:
llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
Index: llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
+++ llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
@@ -550,7 +550,7 @@
// Note that LoopPredecessor might occur in the predecessor list multiple
// times, and we need to add it the right number of times.
- for (const auto &PI : predecessors(Header)) {
+ for (const auto PI : predecessors(Header)) {
if (PI != LoopPredecessor)
continue;
@@ -565,7 +565,7 @@
I8Ty, NewPHI, BasePtrIncSCEV->getValue(),
getInstrName(MemI, GEPNodeIncNameSuffix), InsPoint);
cast<GetElementPtrInst>(PtrInc)->setIsInBounds(IsPtrInBounds(BasePtr));
- for (const auto &PI : predecessors(Header)) {
+ for (const auto PI : predecessors(Header)) {
if (PI == LoopPredecessor)
continue;
@@ -580,7 +580,7 @@
} else {
// Note that LoopPredecessor might occur in the predecessor list multiple
// times, and we need to make sure no more incoming value for them in PHI.
- for (const auto &PI : predecessors(Header)) {
+ for (const auto PI : predecessors(Header)) {
if (PI == LoopPredecessor)
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71811.235055.patch
Type: text/x-patch
Size: 1252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191222/b3174880/attachment.bin>
More information about the llvm-commits
mailing list