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

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 9 11:02:14 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
----------------
andykaylor wrote:

Can you reformat this to fit in 80 columns?

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


More information about the cfe-commits mailing list