Skip to content

Commit

Permalink
[indvars] Missing variables at Og:
Browse files Browse the repository at this point in the history
https://bugs.llvm.org/show_bug.cgi?id=51735
#51077

Fix clang-format found issues in updated patch.
  • Loading branch information
CarlosAlbertoEnciso committed Jan 9, 2024
1 parent 50ec4d1 commit 0270560
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/Transforms/Utils/LoopUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1523,13 +1523,15 @@ int llvm::rewriteLoopExitValues(Loop *L, LoopInfo *LI, TargetLibraryInfo *TLI,
Instruction *InsertPt =
(isa<PHINode>(Inst) || isa<LandingPadInst>(Inst)) ?
&*Inst->getParent()->getFirstInsertionPt() : Inst;
RewritePhiSet.emplace_back(PN, i, ExitValue, InsertPt, HighCost, ExitBB);
RewritePhiSet.emplace_back(PN, i, ExitValue, InsertPt, HighCost,
ExitBB);

// Add debug values if the PN is a induction variable.
PHINode *IndVar = L->getInductionVariable(*SE);
if (PN->getIncomingValue(i) == IndVar)
if (BasicBlock *Successor = ExitBB->getSingleSuccessor())
addDebugValuesToIncomingValue(Successor, PN->getIncomingValue(i), PN);
addDebugValuesToIncomingValue(Successor, PN->getIncomingValue(i),
PN);
}
}
}
Expand Down

0 comments on commit 0270560

Please sign in to comment.