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