diff --git a/src/coreclr/jit/fgehopt.cpp b/src/coreclr/jit/fgehopt.cpp index 0474e6b13832e6..07f03b5e70971f 100644 --- a/src/coreclr/jit/fgehopt.cpp +++ b/src/coreclr/jit/fgehopt.cpp @@ -1194,7 +1194,6 @@ PhaseStatus Compiler::fgCloneFinally() unsigned regionBBCount = 0; unsigned regionStmtCount = 0; bool hasFinallyRet = false; - bool isAllRare = true; bool hasSwitch = false; for (BasicBlock* const block : Blocks(firstBlock, lastBlock)) @@ -1215,7 +1214,6 @@ PhaseStatus Compiler::fgCloneFinally() } hasFinallyRet = hasFinallyRet || block->KindIs(BBJ_EHFINALLYRET); - isAllRare = isAllRare && block->isRunRarely(); } // Skip cloning if the finally has a switch. @@ -1232,13 +1230,6 @@ PhaseStatus Compiler::fgCloneFinally() continue; } - // Skip cloning if the finally is rarely run code. - if (isAllRare) - { - JITDUMP("Finally in EH#%u is run rarely; skipping.\n", XTnum); - continue; - } - // Empirical studies from CoreCLR and CoreFX show that less // that 1% of finally regions have more than 15 // statements. So, to avoid potentially excessive code growth,