@@ -584,12 +584,12 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
584584 resultflags.RemoveInstructionSet (InstructionSet_SSE41);
585585 if (resultflags.HasInstructionSet (InstructionSet_SSE42) && !resultflags.HasInstructionSet (InstructionSet_SSE41))
586586 resultflags.RemoveInstructionSet (InstructionSet_SSE42);
587+ if (resultflags.HasInstructionSet (InstructionSet_POPCNT) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
588+ resultflags.RemoveInstructionSet (InstructionSet_POPCNT);
587589 if (resultflags.HasInstructionSet (InstructionSet_AVX) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
588590 resultflags.RemoveInstructionSet (InstructionSet_AVX);
589591 if (resultflags.HasInstructionSet (InstructionSet_AVX2) && !resultflags.HasInstructionSet (InstructionSet_AVX))
590592 resultflags.RemoveInstructionSet (InstructionSet_AVX2);
591- if (resultflags.HasInstructionSet (InstructionSet_AES) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
592- resultflags.RemoveInstructionSet (InstructionSet_AES);
593593 if (resultflags.HasInstructionSet (InstructionSet_BMI1) && !resultflags.HasInstructionSet (InstructionSet_AVX))
594594 resultflags.RemoveInstructionSet (InstructionSet_BMI1);
595595 if (resultflags.HasInstructionSet (InstructionSet_BMI2) && !resultflags.HasInstructionSet (InstructionSet_AVX))
@@ -598,22 +598,8 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
598598 resultflags.RemoveInstructionSet (InstructionSet_FMA);
599599 if (resultflags.HasInstructionSet (InstructionSet_LZCNT) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
600600 resultflags.RemoveInstructionSet (InstructionSet_LZCNT);
601- if (resultflags.HasInstructionSet (InstructionSet_PCLMULQDQ) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
602- resultflags.RemoveInstructionSet (InstructionSet_PCLMULQDQ);
603- if (resultflags.HasInstructionSet (InstructionSet_POPCNT) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
604- resultflags.RemoveInstructionSet (InstructionSet_POPCNT);
605- if (resultflags.HasInstructionSet (InstructionSet_Vector128) && !resultflags.HasInstructionSet (InstructionSet_SSE))
606- resultflags.RemoveInstructionSet (InstructionSet_Vector128);
607- if (resultflags.HasInstructionSet (InstructionSet_Vector256) && !resultflags.HasInstructionSet (InstructionSet_AVX))
608- resultflags.RemoveInstructionSet (InstructionSet_Vector256);
609- if (resultflags.HasInstructionSet (InstructionSet_Vector512) && !resultflags.HasInstructionSet (InstructionSet_AVX512F))
610- resultflags.RemoveInstructionSet (InstructionSet_Vector512);
611- if (resultflags.HasInstructionSet (InstructionSet_AVXVNNI) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
612- resultflags.RemoveInstructionSet (InstructionSet_AVXVNNI);
613601 if (resultflags.HasInstructionSet (InstructionSet_MOVBE) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
614602 resultflags.RemoveInstructionSet (InstructionSet_MOVBE);
615- if (resultflags.HasInstructionSet (InstructionSet_X86Serialize) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
616- resultflags.RemoveInstructionSet (InstructionSet_X86Serialize);
617603 if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
618604 resultflags.RemoveInstructionSet (InstructionSet_EVEX);
619605 if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_FMA))
@@ -646,10 +632,14 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
646632 resultflags.RemoveInstructionSet (InstructionSet_AVX512VBMI_VL);
647633 if (resultflags.HasInstructionSet (InstructionSet_AVX512VBMI_VL) && !resultflags.HasInstructionSet (InstructionSet_AVX512BW_VL))
648634 resultflags.RemoveInstructionSet (InstructionSet_AVX512VBMI_VL);
649- if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
650- resultflags.RemoveInstructionSet (InstructionSet_EVEX);
651- if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_FMA))
652- resultflags.RemoveInstructionSet (InstructionSet_EVEX);
635+ if (resultflags.HasInstructionSet (InstructionSet_AES) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
636+ resultflags.RemoveInstructionSet (InstructionSet_AES);
637+ if (resultflags.HasInstructionSet (InstructionSet_PCLMULQDQ) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
638+ resultflags.RemoveInstructionSet (InstructionSet_PCLMULQDQ);
639+ if (resultflags.HasInstructionSet (InstructionSet_AVXVNNI) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
640+ resultflags.RemoveInstructionSet (InstructionSet_AVXVNNI);
641+ if (resultflags.HasInstructionSet (InstructionSet_X86Serialize) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
642+ resultflags.RemoveInstructionSet (InstructionSet_X86Serialize);
653643 if (resultflags.HasInstructionSet (InstructionSet_AVX10v1) && !resultflags.HasInstructionSet (InstructionSet_EVEX))
654644 resultflags.RemoveInstructionSet (InstructionSet_AVX10v1);
655645 if (resultflags.HasInstructionSet (InstructionSet_AVX10v1_V512) && !resultflags.HasInstructionSet (InstructionSet_AVX10v1))
@@ -674,18 +664,18 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
674664 resultflags.RemoveInstructionSet (InstructionSet_AVX10v1_V512);
675665 if (resultflags.HasInstructionSet (InstructionSet_AVX10v1_V512) && !resultflags.HasInstructionSet (InstructionSet_AVX512VBMI_VL))
676666 resultflags.RemoveInstructionSet (InstructionSet_AVX10v1_V512);
667+ if (resultflags.HasInstructionSet (InstructionSet_Vector128) && !resultflags.HasInstructionSet (InstructionSet_SSE))
668+ resultflags.RemoveInstructionSet (InstructionSet_Vector128);
669+ if (resultflags.HasInstructionSet (InstructionSet_Vector256) && !resultflags.HasInstructionSet (InstructionSet_AVX))
670+ resultflags.RemoveInstructionSet (InstructionSet_Vector256);
671+ if (resultflags.HasInstructionSet (InstructionSet_Vector512) && !resultflags.HasInstructionSet (InstructionSet_AVX512F))
672+ resultflags.RemoveInstructionSet (InstructionSet_Vector512);
677673 if (resultflags.HasInstructionSet (InstructionSet_VectorT128) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
678674 resultflags.RemoveInstructionSet (InstructionSet_VectorT128);
679675 if (resultflags.HasInstructionSet (InstructionSet_VectorT256) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
680676 resultflags.RemoveInstructionSet (InstructionSet_VectorT256);
681677 if (resultflags.HasInstructionSet (InstructionSet_VectorT512) && !resultflags.HasInstructionSet (InstructionSet_AVX512F))
682678 resultflags.RemoveInstructionSet (InstructionSet_VectorT512);
683- if (resultflags.HasInstructionSet (InstructionSet_AVX512F) && !resultflags.HasInstructionSet (InstructionSet_AVX512BW_VL))
684- resultflags.RemoveInstructionSet (InstructionSet_AVX512F);
685- if (resultflags.HasInstructionSet (InstructionSet_AVX512F) && !resultflags.HasInstructionSet (InstructionSet_AVX512CD_VL))
686- resultflags.RemoveInstructionSet (InstructionSet_AVX512F);
687- if (resultflags.HasInstructionSet (InstructionSet_AVX512F) && !resultflags.HasInstructionSet (InstructionSet_AVX512DQ_VL))
688- resultflags.RemoveInstructionSet (InstructionSet_AVX512F);
689679#endif // TARGET_AMD64
690680#ifdef TARGET_X86
691681 if (resultflags.HasInstructionSet (InstructionSet_SSE) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
@@ -700,12 +690,12 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
700690 resultflags.RemoveInstructionSet (InstructionSet_SSE41);
701691 if (resultflags.HasInstructionSet (InstructionSet_SSE42) && !resultflags.HasInstructionSet (InstructionSet_SSE41))
702692 resultflags.RemoveInstructionSet (InstructionSet_SSE42);
693+ if (resultflags.HasInstructionSet (InstructionSet_POPCNT) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
694+ resultflags.RemoveInstructionSet (InstructionSet_POPCNT);
703695 if (resultflags.HasInstructionSet (InstructionSet_AVX) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
704696 resultflags.RemoveInstructionSet (InstructionSet_AVX);
705697 if (resultflags.HasInstructionSet (InstructionSet_AVX2) && !resultflags.HasInstructionSet (InstructionSet_AVX))
706698 resultflags.RemoveInstructionSet (InstructionSet_AVX2);
707- if (resultflags.HasInstructionSet (InstructionSet_AES) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
708- resultflags.RemoveInstructionSet (InstructionSet_AES);
709699 if (resultflags.HasInstructionSet (InstructionSet_BMI1) && !resultflags.HasInstructionSet (InstructionSet_AVX))
710700 resultflags.RemoveInstructionSet (InstructionSet_BMI1);
711701 if (resultflags.HasInstructionSet (InstructionSet_BMI2) && !resultflags.HasInstructionSet (InstructionSet_AVX))
@@ -714,22 +704,8 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
714704 resultflags.RemoveInstructionSet (InstructionSet_FMA);
715705 if (resultflags.HasInstructionSet (InstructionSet_LZCNT) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
716706 resultflags.RemoveInstructionSet (InstructionSet_LZCNT);
717- if (resultflags.HasInstructionSet (InstructionSet_PCLMULQDQ) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
718- resultflags.RemoveInstructionSet (InstructionSet_PCLMULQDQ);
719- if (resultflags.HasInstructionSet (InstructionSet_POPCNT) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
720- resultflags.RemoveInstructionSet (InstructionSet_POPCNT);
721- if (resultflags.HasInstructionSet (InstructionSet_Vector128) && !resultflags.HasInstructionSet (InstructionSet_SSE))
722- resultflags.RemoveInstructionSet (InstructionSet_Vector128);
723- if (resultflags.HasInstructionSet (InstructionSet_Vector256) && !resultflags.HasInstructionSet (InstructionSet_AVX))
724- resultflags.RemoveInstructionSet (InstructionSet_Vector256);
725- if (resultflags.HasInstructionSet (InstructionSet_Vector512) && !resultflags.HasInstructionSet (InstructionSet_AVX512F))
726- resultflags.RemoveInstructionSet (InstructionSet_Vector512);
727- if (resultflags.HasInstructionSet (InstructionSet_AVXVNNI) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
728- resultflags.RemoveInstructionSet (InstructionSet_AVXVNNI);
729707 if (resultflags.HasInstructionSet (InstructionSet_MOVBE) && !resultflags.HasInstructionSet (InstructionSet_SSE42))
730708 resultflags.RemoveInstructionSet (InstructionSet_MOVBE);
731- if (resultflags.HasInstructionSet (InstructionSet_X86Serialize) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
732- resultflags.RemoveInstructionSet (InstructionSet_X86Serialize);
733709 if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
734710 resultflags.RemoveInstructionSet (InstructionSet_EVEX);
735711 if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_FMA))
@@ -762,10 +738,14 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
762738 resultflags.RemoveInstructionSet (InstructionSet_AVX512VBMI_VL);
763739 if (resultflags.HasInstructionSet (InstructionSet_AVX512VBMI_VL) && !resultflags.HasInstructionSet (InstructionSet_AVX512BW_VL))
764740 resultflags.RemoveInstructionSet (InstructionSet_AVX512VBMI_VL);
765- if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
766- resultflags.RemoveInstructionSet (InstructionSet_EVEX);
767- if (resultflags.HasInstructionSet (InstructionSet_EVEX) && !resultflags.HasInstructionSet (InstructionSet_FMA))
768- resultflags.RemoveInstructionSet (InstructionSet_EVEX);
741+ if (resultflags.HasInstructionSet (InstructionSet_AES) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
742+ resultflags.RemoveInstructionSet (InstructionSet_AES);
743+ if (resultflags.HasInstructionSet (InstructionSet_PCLMULQDQ) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
744+ resultflags.RemoveInstructionSet (InstructionSet_PCLMULQDQ);
745+ if (resultflags.HasInstructionSet (InstructionSet_AVXVNNI) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
746+ resultflags.RemoveInstructionSet (InstructionSet_AVXVNNI);
747+ if (resultflags.HasInstructionSet (InstructionSet_X86Serialize) && !resultflags.HasInstructionSet (InstructionSet_X86Base))
748+ resultflags.RemoveInstructionSet (InstructionSet_X86Serialize);
769749 if (resultflags.HasInstructionSet (InstructionSet_AVX10v1) && !resultflags.HasInstructionSet (InstructionSet_EVEX))
770750 resultflags.RemoveInstructionSet (InstructionSet_AVX10v1);
771751 if (resultflags.HasInstructionSet (InstructionSet_AVX10v1_V512) && !resultflags.HasInstructionSet (InstructionSet_AVX10v1))
@@ -790,18 +770,18 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
790770 resultflags.RemoveInstructionSet (InstructionSet_AVX10v1_V512);
791771 if (resultflags.HasInstructionSet (InstructionSet_AVX10v1_V512) && !resultflags.HasInstructionSet (InstructionSet_AVX512VBMI_VL))
792772 resultflags.RemoveInstructionSet (InstructionSet_AVX10v1_V512);
773+ if (resultflags.HasInstructionSet (InstructionSet_Vector128) && !resultflags.HasInstructionSet (InstructionSet_SSE))
774+ resultflags.RemoveInstructionSet (InstructionSet_Vector128);
775+ if (resultflags.HasInstructionSet (InstructionSet_Vector256) && !resultflags.HasInstructionSet (InstructionSet_AVX))
776+ resultflags.RemoveInstructionSet (InstructionSet_Vector256);
777+ if (resultflags.HasInstructionSet (InstructionSet_Vector512) && !resultflags.HasInstructionSet (InstructionSet_AVX512F))
778+ resultflags.RemoveInstructionSet (InstructionSet_Vector512);
793779 if (resultflags.HasInstructionSet (InstructionSet_VectorT128) && !resultflags.HasInstructionSet (InstructionSet_SSE2))
794780 resultflags.RemoveInstructionSet (InstructionSet_VectorT128);
795781 if (resultflags.HasInstructionSet (InstructionSet_VectorT256) && !resultflags.HasInstructionSet (InstructionSet_AVX2))
796782 resultflags.RemoveInstructionSet (InstructionSet_VectorT256);
797783 if (resultflags.HasInstructionSet (InstructionSet_VectorT512) && !resultflags.HasInstructionSet (InstructionSet_AVX512F))
798784 resultflags.RemoveInstructionSet (InstructionSet_VectorT512);
799- if (resultflags.HasInstructionSet (InstructionSet_AVX512F) && !resultflags.HasInstructionSet (InstructionSet_AVX512BW_VL))
800- resultflags.RemoveInstructionSet (InstructionSet_AVX512F);
801- if (resultflags.HasInstructionSet (InstructionSet_AVX512F) && !resultflags.HasInstructionSet (InstructionSet_AVX512CD_VL))
802- resultflags.RemoveInstructionSet (InstructionSet_AVX512F);
803- if (resultflags.HasInstructionSet (InstructionSet_AVX512F) && !resultflags.HasInstructionSet (InstructionSet_AVX512DQ_VL))
804- resultflags.RemoveInstructionSet (InstructionSet_AVX512F);
805785#endif // TARGET_X86
806786
807787 } while (!oldflags.Equals (resultflags));
0 commit comments