[compiler-rt] [llvm] [clang] [X86] Support more ISAs to enable __builtin_cpu_supports (PR #79086)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 2 00:28:08 PST 2024


================
@@ -139,20 +139,77 @@ enum ProcessorFeatures {
   FEATURE_AVX512BITALG,
   FEATURE_AVX512BF16,
   FEATURE_AVX512VP2INTERSECT,
+  FEATURE_3DNOW,
+  FEATURE_ADX = 40,
+  FEATURE_CLDEMOTE = 42,
----------------
phoebewang wrote:

ABM is a AMD specific feature https://en.wikipedia.org/wiki/X86_Bit_manipulation_instruction_set
Maybe LLVM doesn't support it. But we should be able to map it to its corresponding [CPUID bit](https://github.com/gcc-mirror/gcc/blob/02948ced062b730e2859f718dd46bfcaa3c16c6b/gcc/config/i386/cpuid.h#L56). Maybe not in this patch.
I'd expect we can list the missing parts with comments like
```
FEATURE_3DNOW,
FEATURE_ADX = 40,
// FEATURE_ABM,
FEATURE_CLDEMOTE = 42,
```

https://github.com/llvm/llvm-project/pull/79086


More information about the cfe-commits mailing list