[clang] [CIR] Upstream minimal builtin function call support (PR #142981)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 5 13:05:08 PDT 2025
================
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [
let hasVerifier = 1;
}
+//===----------------------------------------------------------------------===//
+// LLVMIntrinsicCallOp
+//===----------------------------------------------------------------------===//
+
+def LLVMIntrinsicCallOp : CIR_Op<"llvm.intrinsic"> {
+ let summary = "Call to llvm intrinsic functions that is not defined in CIR";
+ let description = [{
+ The `cir.llvm.intrinsic` operation represents a call-like expression which has
+ a return type and arguments that map directly to an llvm intrinsic.
+ It only records its own name (`intrinsic_name`).
----------------
andykaylor wrote:
I think the answer is in this comment:
```
// cir::LLVMIntrinsicCallOp expects intrinsic name to not have prefix
// "llvm." For example, `llvm.nvvm.barrier0` should be passed as
// `nvvm.barrier0`.
```
https://github.com/llvm/llvm-project/pull/142981
More information about the cfe-commits
mailing list