From e4467e96b9a4dc295778a41116a058f1de24ecc7 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Sat, 26 Oct 2024 07:55:22 -0700 Subject: [PATCH] unblock inlining of generics with static fields --- src/coreclr/jit/importer.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index b20d0138218438..dd3745f4bc05bc 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -4047,8 +4047,6 @@ GenTree* Compiler::impImportStaticFieldAddress(CORINFO_RESOLVED_TOKEN* pResolved { case CORINFO_FIELD_STATIC_GENERICS_STATIC_HELPER: { - assert(!compIsForInlining()); - // We first call a special helper to get the statics base pointer op1 = impParentClassTokenToHandle(pResolvedToken); @@ -9222,10 +9220,7 @@ void Compiler::impImportBlockCode(BasicBlock* block) compInlineResult->NoteFatal(InlineObservation::CALLEE_LDFLD_NEEDS_HELPER); return; - case CORINFO_FIELD_STATIC_GENERICS_STATIC_HELPER: case CORINFO_FIELD_STATIC_READYTORUN_HELPER: - /* We may be able to inline the field accessors in specific instantiations of generic - * methods */ compInlineResult->NoteFatal(InlineObservation::CALLSITE_LDFLD_NEEDS_HELPER); return;