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
llvm#51077

Fix clang-format found issues in updated patch.
  • Loading branch information
CarlosAlbertoEnciso committed Mar 13, 2024
1 parent 5935de9 commit 9941c3a
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 @@ -1594,13 +1594,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 9941c3a

Please sign in to comment.