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

Roberto Turrado Camblor via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 7 14:41:10 PST 2026


rturrado wrote:

Thanks  @andykaylor, I have added a `clang/test/CIR/CodeGenBuiltins/X86/cpuid-builtins.c` test.

@Lancern, I have changed a couple of things from our last conversation:

1. `CIROps.td`: `basePtr` can be a generic pointer to integer. Since arrays are usually decayed to pointers, this can cover the two cases: receiving a pointer to integer or an array of integers.
2. Verifier: when `basePtr` is of array type, it doesn't have to have exactly 4 elements but at least 4 elements. In every case, the elements are signed integers.

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


More information about the cfe-commits mailing list