File tree 2 files changed +20
-1
lines changed
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,8 @@ bool swift::mayLoadWeakOrUnowned(SILInstruction *instruction) {
427
427
bool swift::maySynchronizeNotConsideringSideEffects (SILInstruction *instruction) {
428
428
return FullApplySite::isa (instruction)
429
429
|| isa<EndApplyInst>(instruction)
430
- || isa<AbortApplyInst>(instruction);
430
+ || isa<AbortApplyInst>(instruction)
431
+ || isa<HopToExecutorInst>(instruction);
431
432
}
432
433
433
434
bool swift::mayBeDeinitBarrierNotConsideringSideEffects (SILInstruction *instruction) {
Original file line number Diff line number Diff line change @@ -85,3 +85,21 @@ entry:
85
85
return %retval : $()
86
86
}
87
87
88
+ actor A {}
89
+
90
+ sil @getA : $() -> (@owned A)
91
+ sil @borrowA : $@yield_once @convention(thin) () -> @yields @guaranteed A
92
+
93
+ // CHECK-LABEL: begin running test 1 of 1 on test_hop_to_executor: is-deinit-barrier
94
+ // CHECK: hop_to_executor
95
+ // CHECK: true
96
+ // CHECK-LABEL: end running test 1 of 1 on test_hop_to_executor: is-deinit-barrier
97
+ sil [ossa] @test_hop_to_executor : $@convention(thin) () -> () {
98
+ %borrowA = function_ref @borrowA : $@yield_once @convention(thin) () -> @yields @guaranteed A
99
+ (%a, %token) = begin_apply %borrowA() : $@yield_once @convention(thin) () -> @yields @guaranteed A
100
+ test_specification "is-deinit-barrier @instruction"
101
+ hop_to_executor %a : $A
102
+ end_apply %token
103
+ %retval = tuple ()
104
+ return %retval : $()
105
+ }
You can’t perform that action at this time.
0 commit comments