@@ -89,6 +89,9 @@ struct UnsafeMutablePointer<T> {
8989}
9090
9191sil @unknown : $@convention(thin) () -> ()
92+ sil @nobarrier : $@convention(thin) () -> () {
93+ [global:]
94+ }
9295sil @use_S : $@convention(thin) (@in_guaranteed S) -> ()
9396
9497// This function is not a synchronization point.
@@ -99,6 +102,9 @@ sil @empty : $@convention(thin) () -> () {
99102
100103sil @f_out : $@convention(thin) <T> () -> @out T
101104sil @f_bool : $@convention(thin) () -> Builtin.Int1
105+ sil @f_bool_no_barrier : $@convention(thin) () -> Builtin.Int1 {
106+ [global:]
107+ }
102108sil [ossa] @take_trivial_struct : $@convention(thin) (TrivialStruct) -> ()
103109sil [ossa] @get_change_out : $@convention(thin) () -> @out Change
104110sil [ossa] @coro : $@yield_once @convention(thin) (@inout X) -> @yields ()
@@ -283,7 +289,7 @@ bb0(%0 : $*T, %1 : $Builtin.Int1):
283289 cond_br %1, bb1, bb2
284290
285291bb1:
286- %8 = function_ref @unknown : $@convention(thin) () -> ()
292+ %8 = function_ref @nobarrier : $@convention(thin) () -> ()
287293 %9 = apply %8() : $@convention(thin) () -> ()
288294 br bb3
289295
@@ -356,7 +362,7 @@ bb0(%0 : $*T):
356362 br bb1
357363
358364bb1:
359- %f = function_ref @f_bool : $@convention(thin) () -> Builtin.Int1
365+ %f = function_ref @f_bool_no_barrier : $@convention(thin) () -> Builtin.Int1
360366 %c = apply %f() : $@convention(thin) () -> Builtin.Int1
361367 cond_br %c, bb2, bb3
362368
@@ -492,7 +498,8 @@ entry(%instance : @owned $S):
492498 br applier
493499
494500applier:
495- apply undef() : $@convention(thin) () -> ()
501+ %f = function_ref @nobarrier : $@convention(thin) () -> ()
502+ apply %f() : $@convention(thin) () -> ()
496503 br good
497504
498505good:
@@ -731,7 +738,7 @@ entry(%instance : @owned $S):
731738 end_access %store_scope : $*S
732739 %load_scope = begin_access [modify] [static] %addr : $*S
733740 %value = load [copy] %load_scope : $*S
734- %unknown = function_ref @unknown : $@convention(thin) () -> ()
741+ %unknown = function_ref @nobarrier : $@convention(thin) () -> ()
735742 apply %unknown() : $@convention(thin) () -> ()
736743 end_access %load_scope : $*S
737744 destroy_addr %addr : $*S
0 commit comments