Skip to content

Conversation

@EgorBo
Copy link
Member

@EgorBo EgorBo commented Jan 28, 2026

Apply @jakobbotsch's suggestion to unblock failing SPMI (x86-crossgen)

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 28, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib
See info in area-owners.md if you want to be subscribed.

EgorBo and others added 2 commits January 28, 2026 15:57
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@EgorBo EgorBo force-pushed the fix-implLimitation-spmi branch from 4554074 to acd3f38 Compare January 28, 2026 15:00
@jkotas
Copy link
Member

jkotas commented Jan 28, 2026

Needs to be handled in AOT compilers too (src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs/CorInfoTypes.cs)

@EgorBo EgorBo marked this pull request as ready for review January 29, 2026 00:41
Copilot AI review requested due to automatic review settings January 29, 2026 00:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a distinct JIT failure code for ReadyToRun/prejit-unsupported scenarios (instead of using CORJIT_IMPLLIMITATION) to address failing SPMI runs during x86 crossgen.

Changes:

  • Add a new CorJitResult value (CORJIT_R2R_UNSUPPORTED) to represent R2R/prejit unsupported failures.
  • Update JIT + VM + tooling (SuperPMI, managed JitInterface) to propagate and handle the new result code.
  • Switch BlockNonDeterministicIntrinsics to report the new result instead of CORJIT_IMPLLIMITATION.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/coreclr/vm/jitinterface.cpp Treat CORJIT_R2R_UNSUPPORTED similarly to other invalid-program JIT results when throwing.
src/coreclr/tools/superpmi/superpmi/jitinstance.cpp Allow SuperPMI to record CORJIT_R2R_UNSUPPORTED as a non-error compile outcome.
src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs Add managed enum value for CORJIT_R2R_UNSUPPORTED.
src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs Map CORJIT_R2R_UNSUPPORTED to the same handling as impl limitations (R2R: RequiresRuntimeJitException).
src/coreclr/jit/error.h Add a new fatal helper declaration for R2R unsupported failures.
src/coreclr/jit/error.cpp Implement the new fatal helper to return CORJIT_R2R_UNSUPPORTED.
src/coreclr/jit/compiler.h Change BlockNonDeterministicIntrinsics to use the new R2R unsupported fatal helper.
src/coreclr/jit/compiler.cpp Include CORJIT_R2R_UNSUPPORTED in the “retry with minopts” failure list.
src/coreclr/inc/corjit.h Add the new CorJitResult enum value.

@EgorBo
Copy link
Member Author

EgorBo commented Jan 29, 2026

PTAL @jkotas @jakobbotsch

@jkotas
Copy link
Member

jkotas commented Jan 29, 2026

The delta looks fine to me, but I do not know any details about the issue you are trying to fix.

@EgorBo
Copy link
Member Author

EgorBo commented Jan 29, 2026

The delta looks fine to me, but I do not know any details about the issue you are trying to fix.

CORJIT_IMPLLIMITATION is returned from many places in JIT (see IMPL_LIMITATION), but today all of them except for this BlockNonDeterministicIntrinsics have a debug-time Assert - we don't want to hit them on our CI, e.g. 'too many exception clauses' and if we do - we want to know why and where it failed.

This specific one is not rare and it's completely fine to hit it (e.g. some SIMD API that may return different results on JIT and R2R) - so instead of ignoring all CORJIT_IMPLLIMITATION in SPMI and possibly missing real issues, we special-case this one to be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants