diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 9450c973bf2f4..0c908fd15daa7 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -6223,7 +6223,7 @@ class Compiler static fgWalkPreFn fgStress64RsltMulCB; void fgStress64RsltMul(); - void fgDebugCheckUpdate(); + void fgDebugCheckUpdate(const bool doAggressiveCompaction); void fgDebugCheckBBNumIncreasing(); void fgDebugCheckBBlist(bool checkBBNum = false, bool checkBBRefs = true); diff --git a/src/coreclr/jit/fgdiagnostic.cpp b/src/coreclr/jit/fgdiagnostic.cpp index 48c7d685ed32a..ffc7a933b5cb5 100644 --- a/src/coreclr/jit/fgdiagnostic.cpp +++ b/src/coreclr/jit/fgdiagnostic.cpp @@ -56,7 +56,7 @@ void Compiler::fgPrintEdgeWeights() #ifdef DEBUG -void Compiler::fgDebugCheckUpdate() +void Compiler::fgDebugCheckUpdate(const bool doAggressiveCompaction) { if (!compStressCompile(STRESS_CHK_FLOW_UPDATE, 30)) { @@ -139,7 +139,7 @@ void Compiler::fgDebugCheckUpdate() /* no un-compacted blocks */ - if (fgCanCompactBlock(block)) + if (fgCanCompactBlock(block) && (doAggressiveCompaction || block->JumpsToNext())) { noway_assert(!"Found un-compacted blocks!"); } diff --git a/src/coreclr/jit/fgopt.cpp b/src/coreclr/jit/fgopt.cpp index 975ad0aaa546e..6720dcb8c003a 100644 --- a/src/coreclr/jit/fgopt.cpp +++ b/src/coreclr/jit/fgopt.cpp @@ -5691,7 +5691,7 @@ bool Compiler::fgUpdateFlowGraph(bool doTailDuplication /* = false */, fgVerifyHandlerTab(); // Make sure that the predecessor lists are accurate fgDebugCheckBBlist(); - fgDebugCheckUpdate(); + fgDebugCheckUpdate(doAggressiveCompaction); } #endif // DEBUG