[clang] [CIR][X86] Implement generic fallback for x86 builtins (PR #177639)

Priyanshu Kumar via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 24 04:11:51 PST 2026


Priyanshu3820 wrote:

Currently, we hit the error-
`In file included from /home/priyanshu/llvm/llvm-project/build/lib/clang/23/include/x86intrin.h:13:
/home/priyanshu/llvm/llvm-project/build/lib/clang/23/include/ia32intrin.h:487:10: error: 
      ClangIR code gen Not Yet Implemented: unimplemented builtin call: __builtin_ia32_rdpmc
  487 |   return __builtin_ia32_rdpmc(__A);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
error: ClangIR code gen Not Yet Implemented: unsupported type for undef rvalue
2 errors generated.`
Which is expected since `emitX86BuiltinExpr` hits the default case in `CIRGenBuiltinX86.cpp` that returns `std::nullopt. But it is generating the correct IR in compiler explorer, see- https://godbolt.org/

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


More information about the cfe-commits mailing list