Skip to content

Commit

Permalink
Allow AltJit for matched VM to also use otherwise unsupported ISAs (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding authored Dec 4, 2024
1 parent 1361d1e commit 8672edd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6042,8 +6042,13 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr,
// Note that it might be better to do this immediately when setting the JIT flags in CILJit::compileMethod()
// (when JitFlags::SetFromFlags() is called), but this is close enough. (To move this logic to
// CILJit::compileMethod() would require moving the info.compMatchedVM computation there as well.)
//
// We additionally want to do this for AltJit so that we can validate ISAs that the underlying CPU may
// not support directly. Doing this check later, after opts.altJit has been initialized might be better
// but it requires moving the whole set of logic down into compCompileHelper after compInitOptions has
// run and we're going to end up exiting early if JIT_FLAG_ALT_JIT and opts.altJit don't match anyways

if (!info.compMatchedVM)
if (!info.compMatchedVM || compileFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT))
{
CORINFO_InstructionSetFlags instructionSetFlags;

Expand Down

0 comments on commit 8672edd

Please sign in to comment.