Skip to content

Commit

Permalink
[PowerPC] 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.

Differential Revision: https://reviews.llvm.org/D71811
  • Loading branch information
mordante committed Dec 22, 2019
1 parent 098d334 commit 1b344e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
Expand Up @@ -550,7 +550,7 @@ bool PPCLoopInstrFormPrep::rewriteLoadStores(Loop *L, Bucket &BucketChain,

// 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 (auto PI : predecessors(Header)) {
if (PI != LoopPredecessor)
continue;

Expand All @@ -565,7 +565,7 @@ bool PPCLoopInstrFormPrep::rewriteLoadStores(Loop *L, Bucket &BucketChain,
I8Ty, NewPHI, BasePtrIncSCEV->getValue(),
getInstrName(MemI, GEPNodeIncNameSuffix), InsPoint);
cast<GetElementPtrInst>(PtrInc)->setIsInBounds(IsPtrInBounds(BasePtr));
for (const auto &PI : predecessors(Header)) {
for (auto PI : predecessors(Header)) {
if (PI == LoopPredecessor)
continue;

Expand All @@ -580,7 +580,7 @@ bool PPCLoopInstrFormPrep::rewriteLoadStores(Loop *L, Bucket &BucketChain,
} 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 (auto PI : predecessors(Header)) {
if (PI == LoopPredecessor)
continue;

Expand Down

0 comments on commit 1b344e7

Please sign in to comment.