Skip to content

Commit 8672edd

Browse files
Allow AltJit for matched VM to also use otherwise unsupported ISAs (#110320)
1 parent 1361d1e commit 8672edd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/coreclr/jit/compiler.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6042,8 +6042,13 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr,
60426042
// Note that it might be better to do this immediately when setting the JIT flags in CILJit::compileMethod()
60436043
// (when JitFlags::SetFromFlags() is called), but this is close enough. (To move this logic to
60446044
// CILJit::compileMethod() would require moving the info.compMatchedVM computation there as well.)
6045+
//
6046+
// We additionally want to do this for AltJit so that we can validate ISAs that the underlying CPU may
6047+
// not support directly. Doing this check later, after opts.altJit has been initialized might be better
6048+
// but it requires moving the whole set of logic down into compCompileHelper after compInitOptions has
6049+
// run and we're going to end up exiting early if JIT_FLAG_ALT_JIT and opts.altJit don't match anyways
60456050

6046-
if (!info.compMatchedVM)
6051+
if (!info.compMatchedVM || compileFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT))
60476052
{
60486053
CORINFO_InstructionSetFlags instructionSetFlags;
60496054

0 commit comments

Comments
 (0)