Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Check ISA directly when printing JitDisasm #112828

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1829,9 +1829,10 @@ void CodeGen::genGenerateMachineCode()
#if defined(TARGET_X86)
if (compiler->canUseEvexEncoding())
{
if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v2))
// Check ISA directly here to avoid JIT-EE calls that could make us miss
if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v2))
{
if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v2_V512))
if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v2_V512))
{
printf("X86 with AVX10.2/512");
}
Expand All @@ -1840,9 +1841,9 @@ void CodeGen::genGenerateMachineCode()
printf("X86 with AVX10.2/256");
}
}
else if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v1))
else if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v1))
{
if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v1_V512))
if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v1_V512))
{
printf("X86 with AVX10.1/512");
}
Expand All @@ -1868,9 +1869,9 @@ void CodeGen::genGenerateMachineCode()
#elif defined(TARGET_AMD64)
if (compiler->canUseEvexEncoding())
{
if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v2))
if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v2))
{
if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v2_V512))
if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v2_V512))
{
printf("X64 with AVX10.2/512");
}
Expand All @@ -1879,9 +1880,9 @@ void CodeGen::genGenerateMachineCode()
printf("X64 with AVX10.2/256");
}
}
else if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v1))
else if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v1))
{
if (compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v1_V512))
if (compiler->opts.compSupportsISA.HasInstructionSet(InstructionSet_AVX10v1_V512))
{
printf("X64 with AVX10.1/512");
}
Expand Down
Loading