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 {
57
57
class C {}
58
58
59
59
sil @getC : $@convention(thin) () -> (@owned C)
60
+ sil @borrowC : $@convention(thin) (@guaranteed C) -> ()
60
61
61
62
extension Klass : MyFakeAnyObject {
62
63
func myFakeMethod()
@@ -1637,3 +1638,16 @@ entry:
1637
1638
%retval = tuple ()
1638
1639
return %retval : $()
1639
1640
}
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