[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 26 09:07:23 PDT 2025
================
@@ -17,3 +17,15 @@ int f4() {
// CHECK-LABEL: cir.func @f4() -> !s32i
// CHECK: %[[#x:]] = cir.call @f3() : () -> !s32i
// CHECK-NEXT: cir.store %[[#x]], %{{.+}} : !s32i, !cir.ptr<!s32i>
+
+int f5(int a, int *b, bool c);
+int f6() {
+ int b = 1;
+ return f5(2, &b, false);
+}
+
+// CHECK-LABEL: cir.func @f6() -> !s32i
+// CHECK: %[[#b:]] = cir.alloca !s32i, !cir.ptr<!s32i>, ["b", init]
+// CHECK: %[[#a:]] = cir.const #cir.int<2> : !s32i
+// CHECK-NEXT: %[[#c:]] = cir.const #false
+// CHECK-NEXT: %5 = cir.call @f5(%[[#a]], %[[#b:]], %[[#c]]) : (!s32i, !cir.ptr<!s32i>, !cir.bool) -> !s32i
----------------
Lancern wrote:
The LLVM IR lowering is NYI implemented for `cir.call`. Should I add an empty implementation of `cir.call` LLVMIR lowering?
https://github.com/llvm/llvm-project/pull/136810
More information about the cfe-commits
mailing list