================
@@ -750,13 +750,16 @@ unsigned llvm::X86::getFeaturePriority(ProcessorFeatures 
Feat) {
 #ifndef NDEBUG
   // Check that priorities are set properly in the .def file. We expect that
   // "compat" features are assigned non-duplicate consecutive priorities
-  // starting from zero (0, 1, ..., num_features - 1).
+  // starting from one (1, ..., 37) and multiple zeros.
 #define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY) PRIORITY,
   unsigned Priorities[] = {
 #include "llvm/TargetParser/X86TargetParser.def"
   };
   std::array<unsigned, std::size(Priorities)> HelperList;
-  std::iota(HelperList.begin(), HelperList.end(), 0);
+  const size_t MaxPriority = 37;
+  std::iota(HelperList.begin(), HelperList.begin() + MaxPriority + 1, 0);
+  for (int i = MaxPriority + 1; i != std::size(Priorities); ++i)
----------------
FreddyLeaf wrote:

Thanks review, will address in next update.

https://github.com/llvm/llvm-project/pull/79086
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to