Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Utils/LoopPeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ std::optional<unsigned> PhiAnalyzer::calculateIterationsToPeel() {
// the remainder loop after peeling. The load must also be used (transitively)
// by an exit condition. Returns the number of iterations to peel off (at the
// moment either 0 or 1).
static unsigned peelToTurnInvariantLoadsDerefencebale(Loop &L,
static unsigned peelToTurnInvariantLoadsDereferenceable(Loop &L,
DominatorTree &DT,
AssumptionCache *AC) {
// Skip loops with a single exiting block, because there should be no benefit
Expand Down Expand Up @@ -816,7 +816,7 @@ void llvm::computePeelCount(Loop *L, unsigned LoopSize,
DesiredPeelCount = std::max(DesiredPeelCount, CountToEliminateCmps);

if (DesiredPeelCount == 0)
DesiredPeelCount = peelToTurnInvariantLoadsDerefencebale(*L, DT, AC);
DesiredPeelCount = peelToTurnInvariantLoadsDereferenceable(*L, DT, AC);

if (DesiredPeelCount > 0) {
DesiredPeelCount = std::min(DesiredPeelCount, MaxPeelCount);
Expand Down
Loading