Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4976,7 +4976,6 @@ unsigned Compiler::fgRunDfs(VisitPreorder visitPreorder, VisitPostorder visitPos
// patchpoint, but during morph we may transform to something that
// requires the original entry (fgEntryBB).
assert(opts.IsOSR());
assert((fgEntryBB->bbRefs == 1) && (fgEntryBB->bbPreds == nullptr));
dfsFrom(fgEntryBB);
}

Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/jit/jiteh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,12 @@ bool Compiler::fgNormalizeEHCase2()
newTryStart->bbRefs++;
}

// Same for OSR's protected entry BB.
if (insertBeforeBlk == fgEntryBB)
{
fgEntryBB = newTryStart;
}

JITDUMP("'try' begin for EH#%u and EH#%u are same block; inserted new " FMT_BB " before " FMT_BB
" "
"as new 'try' begin for EH#%u.\n",
Expand Down