File tree Expand file tree Collapse file tree 3 files changed +37
-25
lines changed Expand file tree Collapse file tree 3 files changed +37
-25
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-sil-opt -enable-sil-verify-all=true %s | %target-sil-opt -enable-sil-verify-all=true | %FileCheck %s
2
2
3
+ sil_stage lowered
4
+
3
5
// CHECK-LABEL: sil @markers : {{.*}} {
4
6
// CHECK: [[MARKER:%[^,]+]] = alloc_pack_metadata
5
7
// CHECK: dealloc_pack_metadata [[MARKER]]
Original file line number Diff line number Diff line change 1
1
// RUN: %target-sil-opt -emit-sorted-sil -verify-continue-on-failure -o /dev/null %s 2>&1 | %FileCheck %s
2
+
2
3
// REQUIRES: asserts
3
4
4
5
sil_stage canonical
@@ -17,28 +18,3 @@ sil [ossa] @end_borrow_1_addr_alloc_stack : $@convention(thin) () -> () {
17
18
%retval = tuple ()
18
19
return %retval : $()
19
20
}
20
-
21
- // CHECK-LABEL: Begin Error in function alloc_pack_metadata_before_tuple
22
- // CHECK: SIL verification failed: Introduces instruction of kind which cannot emit on-stack pack metadata:
23
- // CHECK-LABEL: End Error in function alloc_pack_metadata_before_tuple
24
- sil @alloc_pack_metadata_before_tuple : $@convention(thin) () -> () {
25
- %marker = alloc_pack_metadata $()
26
- %retval = tuple ()
27
- dealloc_pack_metadata %marker : $*()
28
- return %retval : $()
29
- }
30
-
31
- // CHECK-LABEL: Begin Error in function dealloc_pack_metadata_with_bad_operand
32
- // CHECK: SIL verification failed: stack dealloc does not match most recent stack alloc:
33
- // CHECK-LABEL: End Error in function dealloc_pack_metadata_with_bad_operand
34
- // CHECK-LABEL: Begin Error in function dealloc_pack_metadata_with_bad_operand
35
- // CHECK: SIL verification failed: Must have alloc_pack_metadata operand
36
- // CHECK-LABEL: End Error in function dealloc_pack_metadata_with_bad_operand
37
- sil @dealloc_pack_metadata_with_bad_operand : $@convention(thin) <each T> () -> () {
38
- %marker = alloc_pack_metadata $()
39
- // To make the %marker legal.
40
- %out = apply undef<Pack{repeat each T}>() : $@convention(thin) <each T>() -> ()
41
- dealloc_pack_metadata %out : $()
42
- %retval = tuple ()
43
- return %retval : $()
44
- }
Original file line number Diff line number Diff line change
1
+ // RUN: %target-sil-opt -emit-sorted-sil -verify-continue-on-failure -o /dev/null %s 2>&1 | %FileCheck %s
2
+
3
+ // REQUIRES: asserts
4
+
5
+ sil_stage lowered
6
+
7
+ import Builtin
8
+
9
+ class C {}
10
+
11
+ // CHECK-LABEL: Begin Error in function alloc_pack_metadata_before_tuple
12
+ // CHECK: SIL verification failed: Introduces instruction of kind which cannot emit on-stack pack metadata:
13
+ // CHECK-LABEL: End Error in function alloc_pack_metadata_before_tuple
14
+ sil @alloc_pack_metadata_before_tuple : $@convention(thin) () -> () {
15
+ %marker = alloc_pack_metadata $()
16
+ %retval = tuple ()
17
+ dealloc_pack_metadata %marker : $*()
18
+ return %retval : $()
19
+ }
20
+
21
+ // CHECK-LABEL: Begin Error in function dealloc_pack_metadata_with_bad_operand
22
+ // CHECK: SIL verification failed: stack dealloc does not match most recent stack alloc:
23
+ // CHECK-LABEL: End Error in function dealloc_pack_metadata_with_bad_operand
24
+ // CHECK-LABEL: Begin Error in function dealloc_pack_metadata_with_bad_operand
25
+ // CHECK: SIL verification failed: Must have alloc_pack_metadata operand
26
+ // CHECK-LABEL: End Error in function dealloc_pack_metadata_with_bad_operand
27
+ sil @dealloc_pack_metadata_with_bad_operand : $@convention(thin) <each T> () -> () {
28
+ %marker = alloc_pack_metadata $()
29
+ // To make the %marker legal.
30
+ %out = apply undef<Pack{repeat each T}>() : $@convention(thin) <each T>() -> ()
31
+ dealloc_pack_metadata %out : $()
32
+ %retval = tuple ()
33
+ return %retval : $()
34
+ }
You can’t perform that action at this time.
0 commit comments