Skip to content
Merged
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
21 changes: 0 additions & 21 deletions src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2213,27 +2213,6 @@ bool Compiler::fgOptimizeUncondBranchToSimpleCond(BasicBlock* block, BasicBlock*
// At this point we know target is BBJ_COND.
assert(target->KindIs(BBJ_COND));

// Bail out if OSR, as we can have unusual flow into loops. If one
// of target's successors is also a backedge target, this optimization
// may mess up loop recognition by creating too many non-loop preds.
//
if (opts.IsOSR())
{
if (target->GetFalseTarget()->HasFlag(BBF_BACKWARD_JUMP_TARGET))
{
JITDUMP("Deferring: " FMT_BB " --> " FMT_BB "; latter looks like loop top\n", target->bbNum,
target->GetFalseTarget()->bbNum);
return false;
}

if (target->GetTrueTarget()->HasFlag(BBF_BACKWARD_JUMP_TARGET))
{
JITDUMP("Deferring: " FMT_BB " --> " FMT_BB "; latter looks like loop top\n", target->bbNum,
target->GetTrueTarget()->bbNum);
return false;
}
}

// See if this block assigns constant or other interesting tree to that same local.
//
if (!fgBlockEndFavorsTailDuplication(block, lclNum))
Expand Down
Loading