|
1 | 1 | // RUN:%target-swift-frontend -emit-silgen %s -verify -enable-experimental-feature BorrowAndMutateAccessors -enable-library-evolution | %FileCheck %s |
| 2 | +// RUN:%target-swift-frontend -c -Xllvm -sil-print-after=SILGenCleanup %s -verify -enable-experimental-feature BorrowAndMutateAccessors -enable-library-evolution 2>&1 | %FileCheck --check-prefixes=CHECK-SILGEN-CLEANUP %s |
2 | 3 |
|
3 | 4 | // REQUIRES: swift_feature_BorrowAndMutateAccessors |
4 | 5 |
|
@@ -136,6 +137,13 @@ func test() { |
136 | 137 | // CHECK: return [[REG4]] |
137 | 138 | // CHECK: } |
138 | 139 |
|
| 140 | +// CHECK-SILGEN-CLEANUP: sil hidden [ossa] @$s25borrow_accessor_evolution7WrapperV1kAA5KlassCvb : $@convention(method) (@in_guaranteed Wrapper) -> @guaranteed Klass { |
| 141 | +// CHECK-SILGEN-CLEANUP: bb0([[REG0:%.*]] : $*Wrapper): |
| 142 | +// CHECK-SILGEN-CLEANUP: [[REG2:%.*]] = struct_element_addr [[REG0]], #Wrapper._k |
| 143 | +// CHECK-SILGEN-CLEANUP: [[REG3:%.*]] = load_borrow [[REG2]] |
| 144 | +// CHECK-SILGEN-CLEANUP: return_borrow [[REG3]] from_scopes ([[REG3]]) |
| 145 | +// CHECK-SILGEN-CLEANUP: } |
| 146 | + |
139 | 147 | // CHECK-LABEL: sil hidden [ossa] @$s25borrow_accessor_evolution7WrapperV7nested1AA5KlassCvb : $@convention(method) (@in_guaranteed Wrapper) -> @guaranteed Klass { |
140 | 148 | // CHECK: bb0([[REG0:%.*]] : $*Wrapper): |
141 | 149 | // CHECK: debug_value [[REG0]], let, name "self", argno 1, expr op_deref |
@@ -164,6 +172,13 @@ func test() { |
164 | 172 | // CHECK: return [[REG6]] |
165 | 173 | // CHECK: } |
166 | 174 |
|
| 175 | +// CHECK-SILGEN-CLEANUP: sil hidden [ossa] @$s25borrow_accessor_evolution7WrapperVyAA5KlassCSicib : $@convention(method) (Int, @in_guaranteed Wrapper) -> @guaranteed Klass { |
| 176 | +// CHECK-SILGEN-CLEANUP: bb0([[REG0:%.*]] : $Int, [[REG1:%.*]] : $*Wrapper): |
| 177 | +// CHECK-SILGEN-CLEANUP: [[REG4:%.*]] = struct_element_addr [[REG1]], #Wrapper._k |
| 178 | +// CHECK-SILGEN-CLEANUP: [[REG5:%.*]] = load_borrow [[REG4]] |
| 179 | +// CHECK-SILGEN-CLEANUP: return_borrow [[REG5]] from_scopes ([[REG5]]) |
| 180 | +// CHECK-SILGEN-CLEANUP: } |
| 181 | + |
167 | 182 | // CHECK-LABEL: sil hidden [ossa] @$s25borrow_accessor_evolution7WrapperV16nested_subscriptAA5KlassCvb : $@convention(method) (@in_guaranteed Wrapper) -> @guaranteed Klass { |
168 | 183 | // CHECK: bb0([[REG0:%.*]] : $*Wrapper): |
169 | 184 | // CHECK: debug_value [[REG0]], let, name "self", argno 1, expr op_deref |
|
0 commit comments