Skip to content

Commit

Permalink
JIT: Remove BBF_NONE_QUIRK check when optimizing branch to empty unco…
Browse files Browse the repository at this point in the history
…nditional (dotnet#99790)
  • Loading branch information
amanasifkhalid committed Mar 15, 2024
1 parent da2cb96 commit 813bb17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4867,9 +4867,8 @@ bool Compiler::fgUpdateFlowGraph(bool doTailDuplication /* = false */, bool isPh
if (bDest->KindIs(BBJ_ALWAYS) && !bDest->TargetIs(bDest) && // special case for self jumps
bDest->isEmpty())
{
// TODO: Allow optimizing branches to blocks that jump to the next block
const bool optimizeBranch = !bDest->JumpsToNext() || !bDest->HasFlag(BBF_NONE_QUIRK);
if (optimizeBranch && fgOptimizeBranchToEmptyUnconditional(block, bDest))
// Empty blocks that jump to the next block can probably be compacted instead
if (!bDest->JumpsToNext() && fgOptimizeBranchToEmptyUnconditional(block, bDest))
{
change = true;
modified = true;
Expand Down

0 comments on commit 813bb17

Please sign in to comment.