[clang] [CIR][X86] Add support for `cpuid`/`cpuidex` (PR #173197)

Roberto Turrado Camblor via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 9 11:09:17 PST 2026


================
@@ -5896,4 +5896,38 @@ def CIR_BlockAddressOp : CIR_Op<"block_address", [Pure]> {
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// CpuIdOp
+//===----------------------------------------------------------------------===//
+
+def CIR_CpuIdOp : CIR_Op<"cpuid"> {
+  let summary = "Get information about the CPU";
+  let description = [{
+    The `cir.cpuid` operation retrieves different types of CPU information and
+    stores it in an array of 4 integers.
+
+    This operation takes 3 arguments: `cpu_info`, a pointer to an array of 4
+    integers; `function_id`, an integer determining what type of information to be
----------------
rturrado wrote:

Ahh, sure. `git clang-format` doesn't work for `.td` files, does it?

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


More information about the cfe-commits mailing list