[PowerPC] Fixes -Wrange-loop-analysis warnings

This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.

Differential Revision: https://reviews.llvm.org/D71811
This commit is contained in:
Mark de Wever 2019-12-22 19:23:57 +01:00
parent 098d3347e7
commit 1b344e7967
1 changed files with 3 additions and 3 deletions

View File

@ -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;
@ -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;
@ -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;