File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ final class Klass {
5757class C {}
5858
5959sil @getC : $@convention(thin) () -> (@owned C)
60+ sil @borrowC : $@convention(thin) (@guaranteed C) -> ()
6061
6162extension Klass : MyFakeAnyObject {
6263 func myFakeMethod()
@@ -1637,3 +1638,16 @@ entry:
16371638 %retval = tuple ()
16381639 return %retval : $()
16391640}
1641+
1642+ // CHECK-LABEL: sil [ossa] @dont_promote_load_copy_of_inout_aliasable : {{.*}} {
1643+ // CHECK: load [copy]
1644+ // CHECK-LABEL: } // end sil function 'dont_promote_load_copy_of_inout_aliasable'
1645+ sil [ossa] @dont_promote_load_copy_of_inout_aliasable : $@convention(thin) (@inout_aliasable C) -> () {
1646+ bb0(%addr : $*C):
1647+ %c = load [copy] %addr : $*C
1648+ %borrowC = function_ref @borrowC : $@convention(thin) (@guaranteed C) -> ()
1649+ apply %borrowC(%c) : $@convention(thin) (@guaranteed C) -> ()
1650+ destroy_value %c : $C
1651+ %5 = tuple ()
1652+ return %5 : $()
1653+ }
You can’t perform that action at this time.
0 commit comments