================
@@ -344,4 +344,50 @@ module {
// CHECK-NEXT: cir.return %[[P]] : !s32i
// CHECK-NEXT: }
+ cir.func @dead_scope_switch_flat(%arg0: !s32i) {
+ cir.scope {
+ cir.switch.flat %arg0 : !s32i, ^bb1 [
+ 1: ^bb2
+ ]
+ ^bb1:
+ cir.br ^bb3
+ ^bb2:
+ cir.br ^bb3
+ ^bb3:
+ cir.yield
+ }
+ cir.return
+ }
+ // CHECK: cir.func{{.*}} @dead_scope_switch_flat(%{{.*}}: !s32i) {
+ // CHECK-NEXT: cir.return
+ // CHECK-NEXT: }
+
+ cir.func @scope_with_return(%arg0: !s32i) -> !s32i {
----------------
xlauko wrote:
These two tests pass on main without this patch, so they don't pin the new
behavior.
https://github.com/llvm/llvm-project/pull/242180
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits