[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 01:31:16 PDT 2023


pengfei added inline comments.


================
Comment at: llvm/include/llvm/TargetParser/X86TargetParser.h:63
+
+#define X86_FEATURE(ENUM, STRING)
+#define X86_MICROARCH_LEVEL(ENUM, STRING, PRIORITY) FEATURE_##ENUM = PRIORITY,
----------------
Not needed.


================
Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:718
         ;
-    FeaturesMask |= (1ULL << Feature);
+    FeatureMask[Feature / 32] |= 1U << (Feature % 32);
   }
----------------
Should we use vector for future expansion, or add an assert to make sure it won't exceed current limitation?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158811/new/

https://reviews.llvm.org/D158811



More information about the cfe-commits mailing list