================
@@ -0,0 +1,31 @@
+// RUN: cir-opt %s --verify-roundtrip | FileCheck %s
+
+!s32i = !cir.int<s, 32>
+
+module {
+
+cir.func private @division(%a: !s32i, %b: !s32i) -> !s32i
+
+cir.func @flatten_structure_with_try_call_op() {
+   %a = cir.const #cir.int<1> : !s32i
+   %b = cir.const #cir.int<2> : !s32i
+   %3 = cir.try_call @division(%a, %b) ^continue, ^landing_pad : (!s32i, 
!s32i) -> !s32i
+ ^continue:
+   cir.br ^landing_pad
+ ^landing_pad:
+   cir.return
+}
+
+// CHECK: cir.func private @division(!s32i, !s32i) -> !s32i
+
+// CHECK: cir.func @flatten_structure_with_try_call_op() {
+// CHECK-NEXT:   %[[CONST_0:.*]] = cir.const #cir.int<1> : !s32i
+// CHECK-NEXT:   %[[CONST_1:.*]] = cir.const #cir.int<2> : !s32i
+// CHECK-NEXT:   %[[CALL:.*]] = cir.try_call @division(%0, %1) 
^[[CONTINUE:.*]], ^[[LANDING_PAD:.*]] : (!s32i, !s32i) -> !s32i
----------------
andykaylor wrote:

```suggestion
// CHECK-NEXT:   %[[CALL:.*]] = cir.try_call @division(%0, %1) ^[[NORMAL:.*]], 
^[[UNWIND:.*]] : (!s32i, !s32i) -> !s32i
```

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

Reply via email to