diff --git a/src/coreclr/jit/flowgraph.cpp b/src/coreclr/jit/flowgraph.cpp index 38c04eb9e52563..0bfd3a9971c12a 100644 --- a/src/coreclr/jit/flowgraph.cpp +++ b/src/coreclr/jit/flowgraph.cpp @@ -3538,9 +3538,15 @@ const char* sckName(SpecialCodeKind codeKind) // void Compiler::fgAddCodeRef(BasicBlock* srcBlk, SpecialCodeKind kind) { + // Record that the code will call a THROW_HELPER + // so on Windows Amd64 we can allocate the 4 outgoing + // arg slots on the stack frame if there are no other calls. + // + compUsesThrowHelper = true; + if (!fgUseThrowHelperBlocks() && (kind != SCK_FAIL_FAST)) { - // FailFast will still use a thrwo helper, even in debuggable modes. + // FailFast will still use a common throw helper, even in debuggable modes. // return; } @@ -3549,11 +3555,6 @@ void Compiler::fgAddCodeRef(BasicBlock* srcBlk, SpecialCodeKind kind) unsigned const refData = (kind == SCK_FAIL_FAST) ? 0 : bbThrowIndex(srcBlk); - // Record that the code will call a THROW_HELPER - // so on Windows Amd64 we can allocate the 4 outgoing - // arg slots on the stack frame if there are no other calls. - compUsesThrowHelper = true; - // Look for an existing entry that matches what we're looking for // AddCodeDsc* add = fgFindExcptnTarget(kind, refData);