2
2
3
3
// REQUIRES: swift_in_compiler
4
4
5
+ import Builtin
6
+
7
+ typealias Int32 = Builtin.Int32
8
+
9
+ sil_global public @my_errno : $Int32
10
+ sil_global shared @global_var : $Int32
11
+
5
12
sil [ossa] @unknown : $@convention(thin) () -> ()
6
13
7
14
sil [ossa] @unknown_caller : $@convention(thin) () -> () {
@@ -90,10 +97,10 @@ actor A {}
90
97
sil @getA : $() -> (@owned A)
91
98
sil @borrowA : $@yield_once @convention(thin) () -> @yields @guaranteed A
92
99
93
- // CHECK-LABEL: begin running test 1 of 1 on test_hop_to_executor: is-deinit-barrier
100
+ // CHECK-LABEL: begin running test 1 of {{[0-9]+}} on test_hop_to_executor: is-deinit-barrier
94
101
// CHECK: hop_to_executor
95
102
// CHECK: true
96
- // CHECK-LABEL: end running test 1 of 1 on test_hop_to_executor: is-deinit-barrier
103
+ // CHECK-LABEL: end running test 1 of {{[0-9]+}} on test_hop_to_executor: is-deinit-barrier
97
104
sil [ossa] @test_hop_to_executor : $@convention(thin) () -> () {
98
105
%borrowA = function_ref @borrowA : $@yield_once @convention(thin) () -> @yields @guaranteed A
99
106
(%a, %token) = begin_apply %borrowA() : $@yield_once @convention(thin) () -> @yields @guaranteed A
@@ -104,14 +111,31 @@ sil [ossa] @test_hop_to_executor : $@convention(thin) () -> () {
104
111
return %retval : $()
105
112
}
106
113
107
- // CHECK-LABEL: begin running test 1 of 1 on test_instructions_1: is-deinit-barrier
114
+ // CHECK-LABEL: begin running test 1 of {{[0-9]+}} on test_instructions_1: is-deinit-barrier
108
115
// CHECK: debug_step
109
116
// CHECK: false
110
- // CHECK-LABEL: end running test 1 of 1 on test_instructions_1: is-deinit-barrier
117
+ // CHECK-LABEL: end running test 1 of {{[0-9]+}} on test_instructions_1: is-deinit-barrier
118
+ // CHECK-LABEL: begin running test 2 of {{[0-9]+}} on test_instructions_1: is-deinit-barrier
119
+ // CHECK: load [trivial] {{%[^,]+}} : $*Builtin.Int32
120
+ // CHECK: true
121
+ // CHECK-LABEL: end running test 2 of {{[0-9]+}} on test_instructions_1: is-deinit-barrier
122
+ // CHECK-LABEL: begin running test 3 of {{[0-9]+}} on test_instructions_1: is-deinit-barrier
123
+ // CHECK: load [trivial] {{%[^,]+}} : $*Builtin.Int32
124
+ // CHECK: true
125
+ // CHECK-LABEL: end running test 3 of {{[0-9]+}} on test_instructions_1: is-deinit-barrier
111
126
sil [ossa] @test_instructions_1 : $@convention(thin) () -> () {
112
127
entry:
113
128
test_specification "is-deinit-barrier @instruction"
114
129
debug_step
130
+
131
+ %my_errno = global_addr @my_errno : $*Builtin.Int32
132
+ test_specification "is-deinit-barrier @instruction"
133
+ %my_errno_value = load [trivial] %my_errno : $*Int32
134
+
135
+ %global_var = global_addr @global_var : $*Builtin.Int32
136
+ test_specification "is-deinit-barrier @instruction"
137
+ %global_var_value = load [trivial] %global_var : $*Int32
138
+
115
139
%retval = tuple ()
116
140
return %retval : $()
117
141
}
0 commit comments