diff options
Diffstat (limited to 'lib/Target/PowerPC/PPCCTRLoops.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCCTRLoops.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp index 094d3e6a61b5..53f33ac1fc0e 100644 --- a/lib/Target/PowerPC/PPCCTRLoops.cpp +++ b/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -607,7 +607,10 @@ bool PPCCTRLoops::convertToCTRLoop(Loop *L) {    // The old condition may be dead now, and may have even created a dead PHI    // (the original induction variable).    RecursivelyDeleteTriviallyDeadInstructions(OldCond); -  DeleteDeadPHIs(CountedExitBlock); +  // Run through the basic blocks of the loop and see if any of them have dead +  // PHIs that can be removed. +  for (auto I : L->blocks()) +    DeleteDeadPHIs(I);    ++NumCTRLoops;    return MadeChange;  | 
