Fixing the InstructionSetDesc implications (#86486)
authorTanner Gooding <tagoo@outlook.com>
Fri, 2 Jun 2023 03:25:13 +0000 (20:25 -0700)
committerGitHub <noreply@github.com>
Fri, 2 Jun 2023 03:25:13 +0000 (20:25 -0700)
commitc81e83ab01fb3aed44de34e5aff659d28e6c91f4
tree4d036b86a8d64cbe558a286ee13b7f2345d69374
parent0931b5299bd5379e709e9b6e283c35e173122687
Fixing the InstructionSetDesc implications (#86486)

* Fixing the InstructionSetDesc implications

* Adding more NAOT smoke tests covering the missed instruction sets

* Simplify the HasInstructionSet(Avx512F) check in compSetProcessor

* Fixing the NAOT smoke tests

* Fixing some stale comments

* Fixing build failure

* Ensure the X86Serialize test lambda returns a bool

* Fixing build failure

* Ensure AVX2 isn't opportunistically supported and that dynamic checks work correctly for Vector128/256/512.IsHardwareAccelerated

* Ensure Avx512Vbmi has [Intrinsic] on the right members

* Fix the secondary isIsaSupported check to be properly opportunistic for NAOT

* Ensure vpermb is covered

* Allow opportunistic AvxVnni when Avx2 is opted into

* Don't expect opportunistic Avx2 or AvxVnni in the smoke tests

* Ensure Avx2.X64 checks ExpectedAvx2, not ExpectedAvx

* Change the filter the AVX512 NAOT smoke test on OSX

* Updating the CPUID test to cover new ISAs and correctly validate the hierarchy

* Add two more NAOT smoke tests which cover explicit ISA exclusion

* Add additional CpuId validation covering R2R scenarios using various ISA opt-in

* Ensure new R2R tests actually use R2R

* Don't try to expose an invalid --instruction-set combination

* Ensure xarch r2r tests only run on xarch

* Don't compare manufacturer name of CPUID 0x00000000 to 0x80000000

* Filter out the CPUID test on Mono and account for AVX-512 being unsupported on MacOS
28 files changed:
src/coreclr/inc/corinfoinstructionset.h
src/coreclr/inc/jiteeversionguid.h
src/coreclr/jit/compiler.cpp
src/coreclr/jit/compiler.h
src/coreclr/jit/hwintrinsic.cpp
src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
src/coreclr/nativeaot/Runtime/startup.cpp
src/coreclr/tools/Common/InstructionSetHelpers.cs
src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
src/coreclr/vm/codeman.cpp
src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoX86Intrinsics.xm [new file with mode: 0644]
src/tests/JIT/HardwareIntrinsics/X86/X86Base/CpuId.cs
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx.csproj [new file with mode: 0644]
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj [moved from src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64Vex.csproj with 91% similarity]
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj [new file with mode: 0644]
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx_NoAvx2.csproj [new file with mode: 0644]
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Baseline.csproj
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Sse42.csproj [moved from src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64NonVex.csproj with 83% similarity]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId.cs [new file with mode: 0644]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx.csproj [new file with mode: 0644]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx2.csproj [new file with mode: 0644]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx512.csproj [new file with mode: 0644]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx_NoAvx2.csproj [new file with mode: 0644]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Baseline.csproj [new file with mode: 0644]
src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Sse42.csproj [new file with mode: 0644]