Fix JIT assertion for AsyncContinuation in GDV compatibility check#123664
Merged
jakobbotsch merged 2 commits intomainfrom Jan 28, 2026
Merged
Fix JIT assertion for AsyncContinuation in GDV compatibility check#123664jakobbotsch merged 2 commits intomainfrom
jakobbotsch merged 2 commits intomainfrom
Conversation
Co-authored-by: jakobbotsch <[email protected]>
Copilot
AI
changed the title
[WIP] Fix assertion failure for GDV candidate
Fix JIT assertion for AsyncContinuation in GDV compatibility check
Jan 27, 2026
jakobbotsch
approved these changes
Jan 27, 2026
Member
|
PTAL @dotnet/jit-contrib |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the JIT’s Guarded Devirtualization (GDV) compatibility check to correctly handle compiler-inserted async continuation arguments, preventing an assertion under tiered PGO with delegate/vtable profiling.
Changes:
- Extend
Compiler::isCompatibleMethodGDVto treatWellKnownArg::AsyncContinuationlikeRetBufferandThisPointeras a non-IL-signature argument that should be skipped during compatibility checks. - Align GDV compatibility handling with existing async continuation handling already present in
fginline.cppandimporter.cpp, removing the"Unexpected well known arg to method GDV candidate"assertion in the reported configurations.
EgorBo
approved these changes
Jan 27, 2026
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
This was referenced Jan 27, 2026
Open
Member
|
/ba-g Known infra timeouts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
JIT hits assertion
'!"Unexpected well known arg to method GDV candidate"'when Guarded Devirtualization encounters methods withAsyncContinuationarguments under tiered PGO with delegate/vtable profiling enabled.Changes
Added
WellKnownArg::AsyncContinuationto the signature compatibility check inisCompatibleMethodGDV:Like
RetBufferandThisPointer, async continuations are compiler-inserted arguments not reflected in the IL signature. The compatibility check must skip them when matching call arguments against the target method signature.Consistent with existing handling in
fginline.cppandimporter.cpp.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.