@@ -25,30 +25,30 @@ sil [_semantics "array.uninitialized"] @allocArray : $@convention(thin) <τ_0_0>
25
25
// CHECK-LABEL: sil @deadarray
26
26
// CHECK-NOT: apply
27
27
// CHECK-NOT: store
28
- // CHECK: strong_retain
29
- // CHECK-NEXT: strong_release
30
- // CHECK-NEXT: strong_release
31
- // CHECK-NEXT: tuple ()
32
- // CHECK-NEXT: return
33
28
sil @deadarray : $@convention(thin) (@owned TrivialDestructor) -> () {
34
29
bb0(%0 : $TrivialDestructor):
30
+ // CHECK: strong_retain %0 : $TrivialDestructor
35
31
%2 = integer_literal $Builtin.Word, 2
36
32
// function_ref Swift._allocateUninitializedArray <A> (Builtin.Word) -> (Swift.Array<A>, Builtin.RawPointer)
37
33
%3 = function_ref @allocArray : $@convention(thin) <τ_0_0> (Builtin.Word) -> @owned (Array<τ_0_0>, Builtin.RawPointer)
38
34
%4 = apply %3<TrivialDestructor>(%2) : $@convention(thin) <τ_0_0> (Builtin.Word) -> @owned (Array<τ_0_0>, Builtin.RawPointer)
39
35
%5 = tuple_extract %4 : $(Array<TrivialDestructor>, Builtin.RawPointer), 0
40
36
%6 = tuple_extract %4 : $(Array<TrivialDestructor>, Builtin.RawPointer), 1
41
37
%7 = pointer_to_address %6 : $Builtin.RawPointer to $*TrivialDestructor
38
+ // CHECK-NEXT: strong_release %0 : $TrivialDestructor, loc "{{.*}}":[[@LINE+1]]:3
42
39
store %0 to %7 : $*TrivialDestructor
43
40
%9 = integer_literal $Builtin.Word, 1
44
41
%10 = index_addr %7 : $*TrivialDestructor, %9 : $Builtin.Word
42
+ // CHECK-NEXT: strong_release %0 : $TrivialDestructor, loc "{{.*}}":[[@LINE+1]]:3
45
43
store %0 to %10 : $*TrivialDestructor
46
44
%13 = struct_extract %5 : $Array<TrivialDestructor>, #Array._buffer
47
45
%14 = struct_extract %13 : $_ArrayBuffer<TrivialDestructor>, #_ArrayBuffer._storage
48
46
%15 = struct_extract %14 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue
49
47
strong_retain %0 : $TrivialDestructor
50
48
strong_release %15 : $Builtin.BridgeObject
49
+ // CHECK-NEXT: tuple ()
51
50
%18 = tuple ()
51
+ // CHECK-NEXT: return
52
52
return %18 : $()
53
53
}
54
54
0 commit comments