Skip to content

Commit

Permalink
JIT: fix jit stress failures in fgSetBlockOrder (#80975)
Browse files Browse the repository at this point in the history
Defer asserting that bbNums are ordered until we know if we're optimizing
(and hence have computed dominators).

Fixes #80974.
  • Loading branch information
AndyAyersMS authored Jan 21, 2023
1 parent 800936d commit 2f2215f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4692,8 +4692,6 @@ bool Compiler::optReachWithoutCall(BasicBlock* topBB, BasicBlock* botBB)
// When we can determine this, then we can set BBF_GC_SAFE_POINT for
// those helpers too.

noway_assert(topBB->bbNum <= botBB->bbNum);

// We can always check topBB and botBB for any gc safe points and early out

if ((topBB->bbFlags | botBB->bbFlags) & BBF_GC_SAFE_POINT)
Expand All @@ -4709,6 +4707,8 @@ bool Compiler::optReachWithoutCall(BasicBlock* topBB, BasicBlock* botBB)
return true;
}

noway_assert(topBB->bbNum <= botBB->bbNum);

BasicBlock* curBB = topBB;
for (;;)
{
Expand Down

0 comments on commit 2f2215f

Please sign in to comment.