diff --git a/src/coreclr/inc/corinfoinstructionset.h b/src/coreclr/inc/corinfoinstructionset.h index 43f2be795314fc..ce41b79ae7dc76 100644 --- a/src/coreclr/inc/corinfoinstructionset.h +++ b/src/coreclr/inc/corinfoinstructionset.h @@ -102,17 +102,12 @@ enum CORINFO_InstructionSet InstructionSet_X86Serialize_X64=57, InstructionSet_EVEX_X64=58, InstructionSet_AVX512F_X64=59, - InstructionSet_AVX512F_VL_X64=60, - InstructionSet_AVX512BW_X64=61, - InstructionSet_AVX512BW_VL_X64=62, - InstructionSet_AVX512CD_X64=63, - InstructionSet_AVX512CD_VL_X64=64, - InstructionSet_AVX512DQ_X64=65, - InstructionSet_AVX512DQ_VL_X64=66, - InstructionSet_AVX512VBMI_X64=67, - InstructionSet_AVX512VBMI_VL_X64=68, - InstructionSet_AVX10v1_X64=69, - InstructionSet_AVX10v1_V512_X64=70, + InstructionSet_AVX512BW_X64=60, + InstructionSet_AVX512CD_X64=61, + InstructionSet_AVX512DQ_X64=62, + InstructionSet_AVX512VBMI_X64=63, + InstructionSet_AVX10v1_X64=64, + InstructionSet_AVX10v1_V512_X64=65, #endif // TARGET_AMD64 #ifdef TARGET_X86 InstructionSet_X86Base=1, @@ -174,17 +169,12 @@ enum CORINFO_InstructionSet InstructionSet_X86Serialize_X64=57, InstructionSet_EVEX_X64=58, InstructionSet_AVX512F_X64=59, - InstructionSet_AVX512F_VL_X64=60, - InstructionSet_AVX512BW_X64=61, - InstructionSet_AVX512BW_VL_X64=62, - InstructionSet_AVX512CD_X64=63, - InstructionSet_AVX512CD_VL_X64=64, - InstructionSet_AVX512DQ_X64=65, - InstructionSet_AVX512DQ_VL_X64=66, - InstructionSet_AVX512VBMI_X64=67, - InstructionSet_AVX512VBMI_VL_X64=68, - InstructionSet_AVX10v1_X64=69, - InstructionSet_AVX10v1_V512_X64=70, + InstructionSet_AVX512BW_X64=60, + InstructionSet_AVX512CD_X64=61, + InstructionSet_AVX512DQ_X64=62, + InstructionSet_AVX512VBMI_X64=63, + InstructionSet_AVX10v1_X64=64, + InstructionSet_AVX10v1_V512_X64=65, #endif // TARGET_X86 }; @@ -342,24 +332,14 @@ struct CORINFO_InstructionSetFlags AddInstructionSet(InstructionSet_EVEX_X64); if (HasInstructionSet(InstructionSet_AVX512F)) AddInstructionSet(InstructionSet_AVX512F_X64); - if (HasInstructionSet(InstructionSet_AVX512F_VL)) - AddInstructionSet(InstructionSet_AVX512F_VL_X64); if (HasInstructionSet(InstructionSet_AVX512BW)) AddInstructionSet(InstructionSet_AVX512BW_X64); - if (HasInstructionSet(InstructionSet_AVX512BW_VL)) - AddInstructionSet(InstructionSet_AVX512BW_VL_X64); if (HasInstructionSet(InstructionSet_AVX512CD)) AddInstructionSet(InstructionSet_AVX512CD_X64); - if (HasInstructionSet(InstructionSet_AVX512CD_VL)) - AddInstructionSet(InstructionSet_AVX512CD_VL_X64); if (HasInstructionSet(InstructionSet_AVX512DQ)) AddInstructionSet(InstructionSet_AVX512DQ_X64); - if (HasInstructionSet(InstructionSet_AVX512DQ_VL)) - AddInstructionSet(InstructionSet_AVX512DQ_VL_X64); if (HasInstructionSet(InstructionSet_AVX512VBMI)) AddInstructionSet(InstructionSet_AVX512VBMI_X64); - if (HasInstructionSet(InstructionSet_AVX512VBMI_VL)) - AddInstructionSet(InstructionSet_AVX512VBMI_VL_X64); if (HasInstructionSet(InstructionSet_AVX10v1)) AddInstructionSet(InstructionSet_AVX10v1_X64); if (HasInstructionSet(InstructionSet_AVX10v1_V512)) @@ -528,42 +508,22 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_AVX512F); if (resultflags.HasInstructionSet(InstructionSet_AVX512F_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512F)) resultflags.RemoveInstructionSet(InstructionSet_AVX512F_X64); - if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL_X64)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL); - if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL_X64); if (resultflags.HasInstructionSet(InstructionSet_AVX512BW) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_X64)) resultflags.RemoveInstructionSet(InstructionSet_AVX512BW); if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW)) resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_X64); - if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL_X64)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL); - if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL_X64); if (resultflags.HasInstructionSet(InstructionSet_AVX512CD) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_X64)) resultflags.RemoveInstructionSet(InstructionSet_AVX512CD); if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD)) resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_X64); - if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL_X64)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL); - if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL_X64); if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_X64)) resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ); if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ)) resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_X64); - if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL_X64)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL); - if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL_X64); if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_X64)) resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI); if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI)) resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI_X64); - if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL_X64)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI_VL); - if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL)) - resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI_VL_X64); if (resultflags.HasInstructionSet(InstructionSet_AVX10v1) && !resultflags.HasInstructionSet(InstructionSet_AVX10v1_X64)) resultflags.RemoveInstructionSet(InstructionSet_AVX10v1); if (resultflags.HasInstructionSet(InstructionSet_AVX10v1_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX10v1)) @@ -942,40 +902,30 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "AVX512F_X64"; case InstructionSet_AVX512F_VL : return "AVX512F_VL"; - case InstructionSet_AVX512F_VL_X64 : - return "AVX512F_VL_X64"; case InstructionSet_AVX512BW : return "AVX512BW"; case InstructionSet_AVX512BW_X64 : return "AVX512BW_X64"; case InstructionSet_AVX512BW_VL : return "AVX512BW_VL"; - case InstructionSet_AVX512BW_VL_X64 : - return "AVX512BW_VL_X64"; case InstructionSet_AVX512CD : return "AVX512CD"; case InstructionSet_AVX512CD_X64 : return "AVX512CD_X64"; case InstructionSet_AVX512CD_VL : return "AVX512CD_VL"; - case InstructionSet_AVX512CD_VL_X64 : - return "AVX512CD_VL_X64"; case InstructionSet_AVX512DQ : return "AVX512DQ"; case InstructionSet_AVX512DQ_X64 : return "AVX512DQ_X64"; case InstructionSet_AVX512DQ_VL : return "AVX512DQ_VL"; - case InstructionSet_AVX512DQ_VL_X64 : - return "AVX512DQ_VL_X64"; case InstructionSet_AVX512VBMI : return "AVX512VBMI"; case InstructionSet_AVX512VBMI_X64 : return "AVX512VBMI_X64"; case InstructionSet_AVX512VBMI_VL : return "AVX512VBMI_VL"; - case InstructionSet_AVX512VBMI_VL_X64 : - return "AVX512VBMI_VL_X64"; case InstructionSet_AVX10v1 : return "AVX10v1"; case InstructionSet_AVX10v1_X64 : diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index 9be7098d0f7d14..07e246cd3fa13e 100644 --- a/src/coreclr/inc/jiteeversionguid.h +++ b/src/coreclr/inc/jiteeversionguid.h @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID; #define GUID_DEFINED #endif // !GUID_DEFINED -constexpr GUID JITEEVersionIdentifier = { /* d0b6417d-14c1-491c-8819-339ca5c84422 */ - 0xd0b6417d, - 0x14c1, - 0x491c, - {0x88, 0x19, 0x33, 0x9c, 0xa5, 0xc8, 0x44, 0x22} +constexpr GUID JITEEVersionIdentifier = { /* 04021b93-e969-41ed-96cd-4c583673b9ab */ + 0x04021b93, + 0xe969, + 0x41ed, + {0x96, 0xcd, 0x4c, 0x58, 0x36, 0x73, 0xb9, 0xab} }; ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp index 72b0550b7d82d1..48ad12bf76a1c3 100644 --- a/src/coreclr/jit/hwintrinsic.cpp +++ b/src/coreclr/jit/hwintrinsic.cpp @@ -825,15 +825,10 @@ static const HWIntrinsicIsaRange hwintrinsicIsaRangeArray[] = { { NI_Illegal, NI_Illegal }, // X86Serialize_X64 { NI_Illegal, NI_Illegal }, // EVEX_X64 { FIRST_NI_AVX512F_X64, LAST_NI_AVX512F_X64 }, - { NI_Illegal, NI_Illegal }, // AVX512F_VL_X64 { NI_Illegal, NI_Illegal }, // AVX512BW_X64 - { NI_Illegal, NI_Illegal }, // AVX512BW_VL_X64 { NI_Illegal, NI_Illegal }, // AVX512CD_X64 - { NI_Illegal, NI_Illegal }, // AVX512CD_VL_X64 { NI_Illegal, NI_Illegal }, // AVX512DQ_X64 - { NI_Illegal, NI_Illegal }, // AVX512DQ_VL_X64 { NI_Illegal, NI_Illegal }, // AVX512VBMI_X64 - { NI_Illegal, NI_Illegal }, // AVX512VBMI_VL_X64 { FIRST_NI_AVX10v1_X64, LAST_NI_AVX10v1_X64 }, { NI_Illegal, NI_Illegal }, // AVX10v1_V512_X64 #elif defined (TARGET_ARM64) diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp index a833b5733d52c7..ab906c0c956005 100644 --- a/src/coreclr/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/jit/hwintrinsicxarch.cpp @@ -38,24 +38,14 @@ static CORINFO_InstructionSet X64VersionOfIsa(CORINFO_InstructionSet isa) return InstructionSet_AVX2_X64; case InstructionSet_AVX512BW: return InstructionSet_AVX512BW_X64; - case InstructionSet_AVX512BW_VL: - return InstructionSet_AVX512BW_VL_X64; case InstructionSet_AVX512CD: return InstructionSet_AVX512CD_X64; - case InstructionSet_AVX512CD_VL: - return InstructionSet_AVX512CD_VL_X64; case InstructionSet_AVX512DQ: return InstructionSet_AVX512DQ_X64; - case InstructionSet_AVX512DQ_VL: - return InstructionSet_AVX512DQ_VL_X64; case InstructionSet_AVX512F: return InstructionSet_AVX512F_X64; - case InstructionSet_AVX512F_VL: - return InstructionSet_AVX512F_VL_X64; case InstructionSet_AVX512VBMI: return InstructionSet_AVX512VBMI_X64; - case InstructionSet_AVX512VBMI_VL: - return InstructionSet_AVX512VBMI_VL_X64; case InstructionSet_AVX10v1: return InstructionSet_AVX10v1_X64; case InstructionSet_AVX10v1_V512: @@ -832,23 +822,18 @@ bool HWIntrinsicInfo::isFullyImplementedIsa(CORINFO_InstructionSet isa) case InstructionSet_AVX2_X64: case InstructionSet_AVX512F: case InstructionSet_AVX512F_VL: - case InstructionSet_AVX512F_VL_X64: case InstructionSet_AVX512F_X64: case InstructionSet_AVX512BW: case InstructionSet_AVX512BW_VL: - case InstructionSet_AVX512BW_VL_X64: case InstructionSet_AVX512BW_X64: case InstructionSet_AVX512CD: case InstructionSet_AVX512CD_VL: - case InstructionSet_AVX512CD_VL_X64: case InstructionSet_AVX512CD_X64: case InstructionSet_AVX512DQ: case InstructionSet_AVX512DQ_VL: - case InstructionSet_AVX512DQ_VL_X64: case InstructionSet_AVX512DQ_X64: case InstructionSet_AVX512VBMI: case InstructionSet_AVX512VBMI_VL: - case InstructionSet_AVX512VBMI_VL_X64: case InstructionSet_AVX512VBMI_X64: case InstructionSet_AVXVNNI: case InstructionSet_AVXVNNI_X64: diff --git a/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs b/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs index d00bca1109b201..03d6ab76d365be 100644 --- a/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs +++ b/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs @@ -179,23 +179,18 @@ public static int FromInstructionSet(InstructionSet instructionSet) InstructionSet.X64_AVX512F => Avx512, InstructionSet.X64_AVX512F_X64 => Avx512, InstructionSet.X64_AVX512F_VL => Avx512, - InstructionSet.X64_AVX512F_VL_X64 => Avx512, InstructionSet.X64_AVX512BW => Avx512, InstructionSet.X64_AVX512BW_X64 => Avx512, InstructionSet.X64_AVX512BW_VL => Avx512, - InstructionSet.X64_AVX512BW_VL_X64 => Avx512, InstructionSet.X64_AVX512CD => Avx512, InstructionSet.X64_AVX512CD_X64 => Avx512, InstructionSet.X64_AVX512CD_VL => Avx512, - InstructionSet.X64_AVX512CD_VL_X64 => Avx512, InstructionSet.X64_AVX512DQ => Avx512, InstructionSet.X64_AVX512DQ_X64 => Avx512, InstructionSet.X64_AVX512DQ_VL => Avx512, - InstructionSet.X64_AVX512DQ_VL_X64 => Avx512, InstructionSet.X64_AVX512VBMI => Avx512Vbmi, InstructionSet.X64_AVX512VBMI_X64 => Avx512Vbmi, InstructionSet.X64_AVX512VBMI_VL => Avx512Vbmi, - InstructionSet.X64_AVX512VBMI_VL_X64 => Avx512Vbmi, InstructionSet.X64_X86Serialize => Serialize, InstructionSet.X64_X86Serialize_X64 => Serialize, InstructionSet.X64_AVX10v1 => Avx10v1, diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs index 361aa92bea9555..79e1a34afd1650 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs @@ -103,23 +103,18 @@ public static class ReadyToRunInstructionSetHelper case InstructionSet.X64_AVX512F: return ReadyToRunInstructionSet.Avx512F; case InstructionSet.X64_AVX512F_X64: return ReadyToRunInstructionSet.Avx512F; case InstructionSet.X64_AVX512F_VL: return ReadyToRunInstructionSet.Avx512F_VL; - case InstructionSet.X64_AVX512F_VL_X64: return ReadyToRunInstructionSet.Avx512F_VL; case InstructionSet.X64_AVX512BW: return ReadyToRunInstructionSet.Avx512BW; case InstructionSet.X64_AVX512BW_X64: return ReadyToRunInstructionSet.Avx512BW; case InstructionSet.X64_AVX512BW_VL: return ReadyToRunInstructionSet.Avx512BW_VL; - case InstructionSet.X64_AVX512BW_VL_X64: return ReadyToRunInstructionSet.Avx512BW_VL; case InstructionSet.X64_AVX512CD: return ReadyToRunInstructionSet.Avx512CD; case InstructionSet.X64_AVX512CD_X64: return ReadyToRunInstructionSet.Avx512CD; case InstructionSet.X64_AVX512CD_VL: return ReadyToRunInstructionSet.Avx512CD_VL; - case InstructionSet.X64_AVX512CD_VL_X64: return ReadyToRunInstructionSet.Avx512CD_VL; case InstructionSet.X64_AVX512DQ: return ReadyToRunInstructionSet.Avx512DQ; case InstructionSet.X64_AVX512DQ_X64: return ReadyToRunInstructionSet.Avx512DQ; case InstructionSet.X64_AVX512DQ_VL: return ReadyToRunInstructionSet.Avx512DQ_VL; - case InstructionSet.X64_AVX512DQ_VL_X64: return ReadyToRunInstructionSet.Avx512DQ_VL; case InstructionSet.X64_AVX512VBMI: return ReadyToRunInstructionSet.Avx512Vbmi; case InstructionSet.X64_AVX512VBMI_X64: return ReadyToRunInstructionSet.Avx512Vbmi; case InstructionSet.X64_AVX512VBMI_VL: return ReadyToRunInstructionSet.Avx512Vbmi_VL; - case InstructionSet.X64_AVX512VBMI_VL_X64: return ReadyToRunInstructionSet.Avx512Vbmi_VL; case InstructionSet.X64_AVX10v1: return ReadyToRunInstructionSet.Avx10v1; case InstructionSet.X64_AVX10v1_X64: return ReadyToRunInstructionSet.Avx10v1; case InstructionSet.X64_AVX10v1_V512: return ReadyToRunInstructionSet.Avx10v1_V512; @@ -182,23 +177,18 @@ public static class ReadyToRunInstructionSetHelper case InstructionSet.X86_AVX512F: return ReadyToRunInstructionSet.Avx512F; case InstructionSet.X86_AVX512F_X64: return null; case InstructionSet.X86_AVX512F_VL: return ReadyToRunInstructionSet.Avx512F_VL; - case InstructionSet.X86_AVX512F_VL_X64: return null; case InstructionSet.X86_AVX512BW: return ReadyToRunInstructionSet.Avx512BW; case InstructionSet.X86_AVX512BW_X64: return null; case InstructionSet.X86_AVX512BW_VL: return ReadyToRunInstructionSet.Avx512BW_VL; - case InstructionSet.X86_AVX512BW_VL_X64: return null; case InstructionSet.X86_AVX512CD: return ReadyToRunInstructionSet.Avx512CD; case InstructionSet.X86_AVX512CD_X64: return null; case InstructionSet.X86_AVX512CD_VL: return ReadyToRunInstructionSet.Avx512CD_VL; - case InstructionSet.X86_AVX512CD_VL_X64: return null; case InstructionSet.X86_AVX512DQ: return ReadyToRunInstructionSet.Avx512DQ; case InstructionSet.X86_AVX512DQ_X64: return null; case InstructionSet.X86_AVX512DQ_VL: return ReadyToRunInstructionSet.Avx512DQ_VL; - case InstructionSet.X86_AVX512DQ_VL_X64: return null; case InstructionSet.X86_AVX512VBMI: return ReadyToRunInstructionSet.Avx512Vbmi; case InstructionSet.X86_AVX512VBMI_X64: return null; case InstructionSet.X86_AVX512VBMI_VL: return ReadyToRunInstructionSet.Avx512Vbmi_VL; - case InstructionSet.X86_AVX512VBMI_VL_X64: return null; case InstructionSet.X86_AVX10v1: return ReadyToRunInstructionSet.Avx10v1; case InstructionSet.X86_AVX10v1_X64: return null; case InstructionSet.X86_AVX10v1_V512: return ReadyToRunInstructionSet.Avx10v1_V512; diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs index 42807bfcec1d9f..0152638396fa7d 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs @@ -100,15 +100,10 @@ public enum InstructionSet X64_X86Serialize_X64 = InstructionSet_X64.X86Serialize_X64, X64_EVEX_X64 = InstructionSet_X64.EVEX_X64, X64_AVX512F_X64 = InstructionSet_X64.AVX512F_X64, - X64_AVX512F_VL_X64 = InstructionSet_X64.AVX512F_VL_X64, X64_AVX512BW_X64 = InstructionSet_X64.AVX512BW_X64, - X64_AVX512BW_VL_X64 = InstructionSet_X64.AVX512BW_VL_X64, X64_AVX512CD_X64 = InstructionSet_X64.AVX512CD_X64, - X64_AVX512CD_VL_X64 = InstructionSet_X64.AVX512CD_VL_X64, X64_AVX512DQ_X64 = InstructionSet_X64.AVX512DQ_X64, - X64_AVX512DQ_VL_X64 = InstructionSet_X64.AVX512DQ_VL_X64, X64_AVX512VBMI_X64 = InstructionSet_X64.AVX512VBMI_X64, - X64_AVX512VBMI_VL_X64 = InstructionSet_X64.AVX512VBMI_VL_X64, X64_AVX10v1_X64 = InstructionSet_X64.AVX10v1_X64, X64_AVX10v1_V512_X64 = InstructionSet_X64.AVX10v1_V512_X64, X86_X86Base = InstructionSet_X86.X86Base, @@ -170,15 +165,10 @@ public enum InstructionSet X86_X86Serialize_X64 = InstructionSet_X86.X86Serialize_X64, X86_EVEX_X64 = InstructionSet_X86.EVEX_X64, X86_AVX512F_X64 = InstructionSet_X86.AVX512F_X64, - X86_AVX512F_VL_X64 = InstructionSet_X86.AVX512F_VL_X64, X86_AVX512BW_X64 = InstructionSet_X86.AVX512BW_X64, - X86_AVX512BW_VL_X64 = InstructionSet_X86.AVX512BW_VL_X64, X86_AVX512CD_X64 = InstructionSet_X86.AVX512CD_X64, - X86_AVX512CD_VL_X64 = InstructionSet_X86.AVX512CD_VL_X64, X86_AVX512DQ_X64 = InstructionSet_X86.AVX512DQ_X64, - X86_AVX512DQ_VL_X64 = InstructionSet_X86.AVX512DQ_VL_X64, X86_AVX512VBMI_X64 = InstructionSet_X86.AVX512VBMI_X64, - X86_AVX512VBMI_VL_X64 = InstructionSet_X86.AVX512VBMI_VL_X64, X86_AVX10v1_X64 = InstructionSet_X86.AVX10v1_X64, X86_AVX10v1_V512_X64 = InstructionSet_X86.AVX10v1_V512_X64, } @@ -276,17 +266,12 @@ public enum InstructionSet_X64 X86Serialize_X64 = 57, EVEX_X64 = 58, AVX512F_X64 = 59, - AVX512F_VL_X64 = 60, - AVX512BW_X64 = 61, - AVX512BW_VL_X64 = 62, - AVX512CD_X64 = 63, - AVX512CD_VL_X64 = 64, - AVX512DQ_X64 = 65, - AVX512DQ_VL_X64 = 66, - AVX512VBMI_X64 = 67, - AVX512VBMI_VL_X64 = 68, - AVX10v1_X64 = 69, - AVX10v1_V512_X64 = 70, + AVX512BW_X64 = 60, + AVX512CD_X64 = 61, + AVX512DQ_X64 = 62, + AVX512VBMI_X64 = 63, + AVX10v1_X64 = 64, + AVX10v1_V512_X64 = 65, } public enum InstructionSet_X86 @@ -352,17 +337,12 @@ public enum InstructionSet_X86 X86Serialize_X64 = 57, EVEX_X64 = 58, AVX512F_X64 = 59, - AVX512F_VL_X64 = 60, - AVX512BW_X64 = 61, - AVX512BW_VL_X64 = 62, - AVX512CD_X64 = 63, - AVX512CD_VL_X64 = 64, - AVX512DQ_X64 = 65, - AVX512DQ_VL_X64 = 66, - AVX512VBMI_X64 = 67, - AVX512VBMI_VL_X64 = 68, - AVX10v1_X64 = 69, - AVX10v1_V512_X64 = 70, + AVX512BW_X64 = 60, + AVX512CD_X64 = 61, + AVX512DQ_X64 = 62, + AVX512VBMI_X64 = 63, + AVX10v1_X64 = 64, + AVX10v1_V512_X64 = 65, } public unsafe struct InstructionSetFlags : IEnumerable @@ -666,42 +646,22 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512F); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL_X64); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL_X64); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL_X64); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_VL)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL_X64); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX10v1)) resultflags.AddInstructionSet(InstructionSet.X64_AVX10v1_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX10v1_X64)) @@ -1029,24 +989,14 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe resultflags.AddInstructionSet(InstructionSet.X64_EVEX); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512F); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI); - if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_VL_X64)) - resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX10v1_X64)) resultflags.AddInstructionSet(InstructionSet.X64_AVX10v1); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX10v1_V512_X64)) @@ -1490,24 +1440,14 @@ public void Set64BitInstructionSetVariants(TargetArchitecture architecture) AddInstructionSet(InstructionSet.X64_EVEX_X64); if (HasInstructionSet(InstructionSet.X64_AVX512F)) AddInstructionSet(InstructionSet.X64_AVX512F_X64); - if (HasInstructionSet(InstructionSet.X64_AVX512F_VL)) - AddInstructionSet(InstructionSet.X64_AVX512F_VL_X64); if (HasInstructionSet(InstructionSet.X64_AVX512BW)) AddInstructionSet(InstructionSet.X64_AVX512BW_X64); - if (HasInstructionSet(InstructionSet.X64_AVX512BW_VL)) - AddInstructionSet(InstructionSet.X64_AVX512BW_VL_X64); if (HasInstructionSet(InstructionSet.X64_AVX512CD)) AddInstructionSet(InstructionSet.X64_AVX512CD_X64); - if (HasInstructionSet(InstructionSet.X64_AVX512CD_VL)) - AddInstructionSet(InstructionSet.X64_AVX512CD_VL_X64); if (HasInstructionSet(InstructionSet.X64_AVX512DQ)) AddInstructionSet(InstructionSet.X64_AVX512DQ_X64); - if (HasInstructionSet(InstructionSet.X64_AVX512DQ_VL)) - AddInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64); if (HasInstructionSet(InstructionSet.X64_AVX512VBMI)) AddInstructionSet(InstructionSet.X64_AVX512VBMI_X64); - if (HasInstructionSet(InstructionSet.X64_AVX512VBMI_VL)) - AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL_X64); if (HasInstructionSet(InstructionSet.X64_AVX10v1)) AddInstructionSet(InstructionSet.X64_AVX10v1_X64); if (HasInstructionSet(InstructionSet.X64_AVX10v1_V512)) @@ -1558,15 +1498,10 @@ public void Set64BitInstructionSetVariantsUnconditionally(TargetArchitecture arc AddInstructionSet(InstructionSet.X64_X86Serialize_X64); AddInstructionSet(InstructionSet.X64_EVEX_X64); AddInstructionSet(InstructionSet.X64_AVX512F_X64); - AddInstructionSet(InstructionSet.X64_AVX512F_VL_X64); AddInstructionSet(InstructionSet.X64_AVX512BW_X64); - AddInstructionSet(InstructionSet.X64_AVX512BW_VL_X64); AddInstructionSet(InstructionSet.X64_AVX512CD_X64); - AddInstructionSet(InstructionSet.X64_AVX512CD_VL_X64); AddInstructionSet(InstructionSet.X64_AVX512DQ_X64); - AddInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64); AddInstructionSet(InstructionSet.X64_AVX512VBMI_X64); - AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL_X64); AddInstructionSet(InstructionSet.X64_AVX10v1_X64); AddInstructionSet(InstructionSet.X64_AVX10v1_V512_X64); break; @@ -1593,15 +1528,10 @@ public void Set64BitInstructionSetVariantsUnconditionally(TargetArchitecture arc AddInstructionSet(InstructionSet.X86_X86Serialize_X64); AddInstructionSet(InstructionSet.X86_EVEX_X64); AddInstructionSet(InstructionSet.X86_AVX512F_X64); - AddInstructionSet(InstructionSet.X86_AVX512F_VL_X64); AddInstructionSet(InstructionSet.X86_AVX512BW_X64); - AddInstructionSet(InstructionSet.X86_AVX512BW_VL_X64); AddInstructionSet(InstructionSet.X86_AVX512CD_X64); - AddInstructionSet(InstructionSet.X86_AVX512CD_VL_X64); AddInstructionSet(InstructionSet.X86_AVX512DQ_X64); - AddInstructionSet(InstructionSet.X86_AVX512DQ_VL_X64); AddInstructionSet(InstructionSet.X86_AVX512VBMI_X64); - AddInstructionSet(InstructionSet.X86_AVX512VBMI_VL_X64); AddInstructionSet(InstructionSet.X86_AVX10v1_X64); AddInstructionSet(InstructionSet.X86_AVX10v1_V512_X64); break; @@ -1616,19 +1546,16 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite if (metadataType == null) return InstructionSet.ILLEGAL; - string namespaceName; + string namespaceName = metadataType.Namespace; string typeName = metadataType.Name; string nestedTypeName = null; - if (metadataType.ContainingType != null) + while (metadataType.ContainingType != null) { var enclosingType = (MetadataType)metadataType.ContainingType; namespaceName = enclosingType.Namespace; - nestedTypeName = metadataType.Name; + nestedTypeName = nestedTypeName is null ? metadataType.Name : $"{metadataType.Name}_{nestedTypeName}"; typeName = enclosingType.Name; - } - else - { - namespaceName = metadataType.Namespace; + metadataType = enclosingType; } string platformIntrinsicNamespace; @@ -1891,13 +1818,13 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite if (nestedTypeName == "X64") { return InstructionSet.X64_AVX10v1_X64; } else - { return InstructionSet.X64_AVX10v1; } - - case "Avx10v1_V512": - if (nestedTypeName == "X64") + if (nestedTypeName == "V512_X64") { return InstructionSet.X64_AVX10v1_V512_X64; } else + if (nestedTypeName == "V512") { return InstructionSet.X64_AVX10v1_V512; } + else + { return InstructionSet.X64_AVX10v1; } case "VectorT128": { return InstructionSet.X64_VectorT128; } @@ -2006,10 +1933,10 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite { return InstructionSet.X86_AVX512VBMI; } case "Avx10v1": - { return InstructionSet.X86_AVX10v1; } - - case "Avx10v1_V512": + if (nestedTypeName == "V512") { return InstructionSet.X86_AVX10v1_V512; } + else + { return InstructionSet.X86_AVX10v1; } case "VectorT128": { return InstructionSet.X86_VectorT128; } diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt index dbb8e6efd20adf..1876255732ab8e 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -85,15 +85,10 @@ instructionset64bit,X86 ,MOVBE instructionset64bit,X86 ,X86Serialize instructionset64bit,X86 ,EVEX instructionset64bit,X86 ,AVX512F -instructionset64bit,X86 ,AVX512F_VL instructionset64bit,X86 ,AVX512BW -instructionset64bit,X86 ,AVX512BW_VL instructionset64bit,X86 ,AVX512CD -instructionset64bit,X86 ,AVX512CD_VL instructionset64bit,X86 ,AVX512DQ -instructionset64bit,X86 ,AVX512DQ_VL instructionset64bit,X86 ,AVX512VBMI -instructionset64bit,X86 ,AVX512VBMI_VL instructionset64bit,X86 ,AVX10v1 instructionset64bit,X86 ,AVX10v1_V512 diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs index 3ce3bf5a795dbd..de6ba3e2fc9d91 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs @@ -784,19 +784,16 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite if (metadataType == null) return InstructionSet.ILLEGAL; - string namespaceName; + string namespaceName = metadataType.Namespace; string typeName = metadataType.Name; string nestedTypeName = null; - if (metadataType.ContainingType != null) + while (metadataType.ContainingType != null) { var enclosingType = (MetadataType)metadataType.ContainingType; namespaceName = enclosingType.Namespace; - nestedTypeName = metadataType.Name; + nestedTypeName = nestedTypeName is null ? metadataType.Name : $""{metadataType.Name}_{nestedTypeName}""; typeName = enclosingType.Name; - } - else - { - namespaceName = metadataType.Namespace; + metadataType = enclosingType; } string platformIntrinsicNamespace; @@ -829,51 +826,49 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite switch (typeName) {{ "); - foreach (var instructionSet in _instructionSets) + var archInstructionSets = _instructionSets.Where(isa => isa.Architecture == architecture && !string.IsNullOrEmpty(isa.ManagedName)).ToArray(); + foreach (var instructionSet in archInstructionSets) { - if (instructionSet.Architecture != architecture) continue; - // VL instructionSets are handled as part of their master instruction set. - if (instructionSet.ManagedName.EndsWith("_VL")) + // Nested instructionSets are handled as part of their parent instruction set. + // It's unlikely we'll ever have an implementing managed class with an underscore + // in the public name, so we assume the underscore is a nested type name separator. + if (instructionSet.ManagedName.Contains('_')) continue; - // Instruction sets without a managed name are not handled here. - if (string.IsNullOrEmpty(instructionSet.ManagedName)) - continue; - - InstructionSetInfo vlInstructionSet = null; - foreach (var potentialVLinstructionSet in _instructionSets) + List relatedInstructionSets = [instructionSet]; + foreach (var potentialNestedInstructionSet in archInstructionSets) { - if (instructionSet.Architecture != architecture) continue; - string managedName = potentialVLinstructionSet.ManagedName; - if (managedName.EndsWith("_VL") && instructionSet.ManagedName == managedName.Substring(0, managedName.Length - 3)) + string managedName = potentialNestedInstructionSet.ManagedName; + if (managedName.Contains('_') && instructionSet.ManagedName == managedName[..managedName.IndexOf('_')]) { - vlInstructionSet = potentialVLinstructionSet; break; + relatedInstructionSets.Add(potentialNestedInstructionSet); } } - string hasSixtyFourBitInstructionSet = null; - if (_64bitVariants[architecture].Contains(instructionSet.JitName) && _64BitArchitectures.Contains(architecture)) - { - hasSixtyFourBitInstructionSet = ArchToManagedInstructionSetSuffixArch(architecture); - } - tr.Write(@$" case ""{instructionSet.ManagedName}"":"); - if (hasSixtyFourBitInstructionSet != null) + foreach (var relatedInstructionSet in relatedInstructionSets) { - tr.Write($@" - if (nestedTypeName == ""{hasSixtyFourBitInstructionSet}"") - {{ return InstructionSet.{architecture}_{instructionSet.JitName}_{ArchToInstructionSetSuffixArch(architecture)}; }} + string nestedTypeName = relatedInstructionSet == instructionSet ? null : relatedInstructionSet.ManagedName[(relatedInstructionSet.ManagedName.IndexOf('_') + 1)..]; + bool hasSixtyFourBitInstructionSet = _64bitVariants[architecture].Contains(relatedInstructionSet.JitName) && _64BitArchitectures.Contains(architecture); + if (hasSixtyFourBitInstructionSet) + { + string sixtyFourBitInstructionSet = ArchToManagedInstructionSetSuffixArch(architecture); + tr.Write($@" + if (nestedTypeName == ""{(nestedTypeName is null ? sixtyFourBitInstructionSet : $"{nestedTypeName}_{sixtyFourBitInstructionSet}")}"") + {{ return InstructionSet.{architecture}_{relatedInstructionSet.JitName}_{ArchToInstructionSetSuffixArch(architecture)}; }} else"); - } - if (vlInstructionSet != null) - { - tr.Write($@" - if (nestedTypeName == ""VL"") - {{ return InstructionSet.{architecture}_{vlInstructionSet.JitName}; }} + } + if (nestedTypeName != null) + { + tr.Write($@" + if (nestedTypeName == ""{nestedTypeName}"") + {{ return InstructionSet.{architecture}_{relatedInstructionSet.JitName}; }} else"); + } } + tr.Write($@" {{ return InstructionSet.{architecture}_{instructionSet.JitName}; }} ");