|
84 | 84 | return %23 : $Int32 |
85 | 85 | } |
86 | 86 |
|
| 87 | +// CHECK-LABEL: sil [ossa] @dont_rotate_multi_exit_loop : |
| 88 | +// CHECK: bb1({{.*}}): |
| 89 | +// CHECK: cond_br %{{.*}}, bb4, bb2 |
| 90 | +// CHECK: bb2: |
| 91 | +// CHECK: cond_br undef, bb3, bb5 |
| 92 | +// CHECK: bb6: |
| 93 | +// CHECK: return |
| 94 | +// CHECK-NOT: bb7 |
| 95 | +// CHECK: } // end sil function 'dont_rotate_multi_exit_loop' |
| 96 | +sil [ossa] @dont_rotate_multi_exit_loop : $@convention(thin) (Int32, @owned Bar) -> Int32 { |
| 97 | +bb0(%0 : $Int32, %25: @owned $Bar): |
| 98 | + %1 = struct_extract %0 : $Int32, #Int32._value |
| 99 | + %2 = integer_literal $Builtin.Int32, 0 |
| 100 | + %30 = alloc_box $<τ_0_0> { var τ_0_0 } <Bool> |
| 101 | + %30a = project_box %30 : $<τ_0_0> { var τ_0_0 } <Bool>, 0 |
| 102 | + br bb1(%1 : $Builtin.Int32, %2 : $Builtin.Int32, %25: $Bar, %30 : $<τ_0_0> { var τ_0_0 } <Bool>) |
| 103 | + |
| 104 | +bb1(%4 : $Builtin.Int32, %5 : $Builtin.Int32, %26: @owned $Bar, %31 : @owned $<τ_0_0> { var τ_0_0 } <Bool>): |
| 105 | + %24 = class_method %26 : $Bar, #Bar.foo : (Bar) -> () -> (), $@convention(method) (@guaranteed Bar) -> () // user: %6 |
| 106 | + %27 = apply %24(%26) : $@convention(method) (@guaranteed Bar) -> () |
| 107 | + %6 = struct $Int32 (%5 : $Builtin.Int32) |
| 108 | + %8 = builtin "cmp_eq_Word"(%5 : $Builtin.Int32, %1 : $Builtin.Int32) : $Builtin.Int1 |
| 109 | + cond_br %8, bb4, bb2 |
| 110 | + |
| 111 | +bb2: |
| 112 | + %10 = integer_literal $Builtin.Int32, 1 |
| 113 | + %12 = integer_literal $Builtin.Int1, -1 |
| 114 | + %13 = builtin "sadd_with_overflow_Word"(%5 : $Builtin.Int32, %10 : $Builtin.Int32, %12 : $Builtin.Int1) : $(Builtin.Int32, Builtin.Int1) |
| 115 | + %14 = tuple_extract %13 : $(Builtin.Int32, Builtin.Int1), 0 |
| 116 | + %15 = enum $Optional<Int32>, #Optional.some!enumelt, %6 : $Int32 |
| 117 | + %16 = unchecked_enum_data %15 : $Optional<Int32>, #Optional.some!enumelt |
| 118 | + %17 = struct_extract %16 : $Int32, #Int32._value |
| 119 | + %19 = integer_literal $Builtin.Int1, -1 |
| 120 | + %20 = builtin "sadd_with_overflow_Word"(%4 : $Builtin.Int32, %17 : $Builtin.Int32, %19 : $Builtin.Int1) : $(Builtin.Int32, Builtin.Int1) |
| 121 | + %21 = tuple_extract %20 : $(Builtin.Int32, Builtin.Int1), 0 |
| 122 | + cond_br undef, bb3, bb5 |
| 123 | +bb3: |
| 124 | + br bb1(%21 : $Builtin.Int32, %14 : $Builtin.Int32, %26: $Bar, %31 : $<τ_0_0> { var τ_0_0 } <Bool>) |
| 125 | + |
| 126 | +bb4: |
| 127 | + br bb6 |
| 128 | + |
| 129 | +bb5: |
| 130 | + br bb6 |
| 131 | + |
| 132 | +bb6: |
| 133 | + destroy_value %26 : $Bar |
| 134 | + destroy_value %31 : $<τ_0_0> { var τ_0_0 } <Bool> |
| 135 | + %23 = struct $Int32 (%4 : $Builtin.Int32) |
| 136 | + return %23 : $Int32 |
| 137 | +} |
| 138 | + |
87 | 139 | // CHECK-LABEL: sil [ossa] @dont_duplicate_large_block : |
88 | 140 | // CHECK: bb0(%0 : $Int32, %1 : @owned $Bar): |
89 | 141 | // CHECK-NOT: class_method |
|
0 commit comments