You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: (bug) Rejecting a GDV candidate permanently marks the base virtual method as NOINLINE process-wide #133974
A guarded-devirtualization inline rejection for a synchronized override can set CORINFO_FLG_BAD_INLINEE on the base virtual method. Subsequent unrelated exact calls to Base.M in the same process lose inlining and allocation removal based on tier-up order.
Requires DOTNET_TieredPGO=1, DOTNET_TC_CallCountThreshold=1, DOTNET_TC_CallCountingDelayMs=0, and DOTNET_JitDisasm=Test; pass any argument for the baseline and no arguments to poison Base.M first.
Expected
Test() should still inline Base.M, fold the return value, and eliminate the Base allocation:
; Assembly listing for method Program:Test():int (Tier1)
mov eax, 42
ret
; Total bytes of code 6
420000
Actual
After the separate Poison method tiers up first, Test() is still devirtualized but no longer inlined:
; Assembly listing for method Program:Test():int (Tier1)
call CORINFO_HELP_NEWSFAST
mov rcx, rax
call [Base:M():int:this]
; Total bytes of code 34
850000
Notes
impMarkInlineCandidate builds InlineResult from the base call node for GDV candidates, so InlineResult::Report propagates CALLEE_* failures via setMethodAttribs to gtCallMethHnd (Base.M) rather than the guarded target (Derived.M).
The effect is process-wide and order-dependent because CORINFO_FLG_BAD_INLINEE is a VM-level method attribute.
Reproduces on released .NET 10.0.12 as the same 6-byte vs 34-byte Tier1 codegen difference.
changed the title [-]JIT (bug): Rejecting a GDV candidate permanently marks the base virtual method as NOINLINE process-wide[/-][+]JIT: (bug) Rejecting a GDV candidate permanently marks the base virtual method as NOINLINE process-wide[/+]on Sep 16, 2026
Activity
dotnet-policy-service commentedon Sep 15, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
JIT: Attribute GDV inline failures to candidate (#133993)
[-]JIT (bug): Rejecting a GDV candidate permanently marks the base virtual method as NOINLINE process-wide[/-][+]JIT: (bug) Rejecting a GDV candidate permanently marks the base virtual method as NOINLINE process-wide[/+]JIT: Attribute GDV inline failures to candidate (dotnet#133993)