Skip to content

Commit 33f78c0

Browse files
authored
JIT: Allow RBO for known relops even without a dominator (#86774)
Delay the check for whether there is a dominator to the case where we're actually going to try to infer from it.
1 parent 182b013 commit 33f78c0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/coreclr/jit/redundantbranchopts.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,6 @@ bool Compiler::optRedundantBranch(BasicBlock* const block)
459459
unsigned matchCount = 0;
460460
const unsigned matchLimit = 4;
461461

462-
if (domBlock == nullptr)
463-
{
464-
return false;
465-
}
466-
467462
// Unpack the tree's VN
468463
//
469464
ValueNum treeNormVN;
@@ -482,6 +477,11 @@ bool Compiler::optRedundantBranch(BasicBlock* const block)
482477
}
483478
else
484479
{
480+
if (domBlock == nullptr)
481+
{
482+
return false;
483+
}
484+
485485
JITDUMP("Relop [%06u] " FMT_BB " value unknown, trying inference\n", dspTreeID(tree), block->bbNum);
486486
}
487487

0 commit comments

Comments
 (0)