@@ -1827,11 +1827,14 @@ void CodeGen::genGenerateMachineCode()
1827
1827
printf (" for " );
1828
1828
1829
1829
#if defined(TARGET_X86)
1830
- if (compiler->canUseEvexEncoding ())
1830
+ // Check ISA directly here instead of using
1831
+ // compOpportunisticallyDependsOn to avoid JIT-EE calls that could make
1832
+ // us miss in SPMI
1833
+ if (compiler->opts .compSupportsISA .HasInstructionSet (InstructionSet_EVEX))
1831
1834
{
1832
- if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v2))
1835
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v2))
1833
1836
{
1834
- if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v2_V512))
1837
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v2_V512))
1835
1838
{
1836
1839
printf (" X86 with AVX10.2/512" );
1837
1840
}
@@ -1840,9 +1843,9 @@ void CodeGen::genGenerateMachineCode()
1840
1843
printf (" X86 with AVX10.2/256" );
1841
1844
}
1842
1845
}
1843
- else if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v1))
1846
+ else if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v1))
1844
1847
{
1845
- if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v1_V512))
1848
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v1_V512))
1846
1849
{
1847
1850
printf (" X86 with AVX10.1/512" );
1848
1851
}
@@ -1857,7 +1860,7 @@ void CodeGen::genGenerateMachineCode()
1857
1860
printf (" X86 with AVX512" );
1858
1861
}
1859
1862
}
1860
- else if (compiler->canUseVexEncoding ( ))
1863
+ else if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX ))
1861
1864
{
1862
1865
printf (" X86 with AVX" );
1863
1866
}
@@ -1866,11 +1869,11 @@ void CodeGen::genGenerateMachineCode()
1866
1869
printf (" generic X86" );
1867
1870
}
1868
1871
#elif defined(TARGET_AMD64)
1869
- if (compiler->canUseEvexEncoding ( ))
1872
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_EVEX ))
1870
1873
{
1871
- if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v2))
1874
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v2))
1872
1875
{
1873
- if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v2_V512))
1876
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v2_V512))
1874
1877
{
1875
1878
printf (" X64 with AVX10.2/512" );
1876
1879
}
@@ -1879,9 +1882,9 @@ void CodeGen::genGenerateMachineCode()
1879
1882
printf (" X64 with AVX10.2/256" );
1880
1883
}
1881
1884
}
1882
- else if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v1))
1885
+ else if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v1))
1883
1886
{
1884
- if (compiler->compOpportunisticallyDependsOn (InstructionSet_AVX10v1_V512))
1887
+ if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX10v1_V512))
1885
1888
{
1886
1889
printf (" X64 with AVX10.1/512" );
1887
1890
}
@@ -1896,7 +1899,7 @@ void CodeGen::genGenerateMachineCode()
1896
1899
printf (" X64 with AVX512" );
1897
1900
}
1898
1901
}
1899
- else if (compiler->canUseVexEncoding ( ))
1902
+ else if (compiler->opts . compSupportsISA . HasInstructionSet (InstructionSet_AVX ))
1900
1903
{
1901
1904
printf (" X64 with AVX" );
1902
1905
}
0 commit comments