================
@@ -0,0 +1,29 @@
+// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
+// RUN: cir-opt %s -cir-to-llvm -o - | mlir-translate -mlir-to-llvmir | 
FileCheck %s -check-prefix=LLVM
+
+!s32i = !cir.int<s, 32>
+
+module {
+  cir.func @lifetime_markers() {
+    %0 = cir.alloca !s32i, !cir.ptr<!s32i>, ["x"] {alignment = 4 : i64}
+    cir.lifetime.start %0 : !cir.ptr<!s32i>
+    cir.lifetime.end %0 : !cir.ptr<!s32i>
+    cir.return
+  }
+}
+
+//      MLIR: module {
+// MLIR-NEXT:  llvm.func @lifetime_markers
+// MLIR:        %[[ALLOCA:.*]] = llvm.alloca {{.*}} x i32
+// MLIR:        llvm.intr.lifetime.start %[[ALLOCA]] : !llvm.ptr
+// MLIR:        llvm.intr.lifetime.end %[[ALLOCA]] : !llvm.ptr
+// MLIR:        llvm.return
+// MLIR-NEXT:  }
+// MLIR-NEXT: }
----------------
xlauko wrote:

no need for MLIR test

https://github.com/llvm/llvm-project/pull/199599
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to