Skip to content

Commit 47b2357

Browse files
authored
Merge pull request #13799 from gottesmm/pr-e6cdfc95c125ba22713603096f0838128fefe1d0
2 parents 548878f + 48b633b commit 47b2357

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/SILOptimizer/dead_array_elim.sil

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TrivialDestructor {
2222
// Swift._allocateUninitializedArray <A> (Builtin.Word) -> (Swift.Array<A>, Builtin.RawPointer)
2323
sil [_semantics "array.uninitialized"] @allocArray : $@convention(thin) <τ_0_0> (Builtin.Word) -> @owned (Array<τ_0_0>, Builtin.RawPointer)
2424

25-
sil [_semantics "array.uninitialized"] @adoptStorageSpecialiedForInt : $@convention(method) (@guaranteed _ContiguousArrayStorage<Int>, Int, @thin Array<Int>.Type) -> (@owned Array<Int>, UnsafeMutablePointer<Int>)
25+
sil [_semantics "array.uninitialized"] @adoptStorageSpecialiedForInt : $@convention(method) (@guaranteed _ContiguousArrayStorage<Int>, Builtin.Word, @thin Array<Int>.Type) -> (@owned Array<Int>, UnsafeMutablePointer<Int>)
2626

2727
// CHECK-LABEL: sil @deadarrayWithAdoptStorage : $@convention(thin) () -> () {
2828
// CHECK-NOT: alloc_ref
@@ -31,12 +31,10 @@ sil [_semantics "array.uninitialized"] @adoptStorageSpecialiedForInt : $@convent
3131
sil @deadarrayWithAdoptStorage : $@convention(thin) () -> () {
3232
bb0:
3333
%0 = integer_literal $Builtin.Word, 3
34-
%1 = builtin "zextOrBitCast_Word_Int64"(%0 : $Builtin.Word) : $Builtin.Int64
35-
%2 = struct $Int (%1 : $Builtin.Int64)
3634
%6 = alloc_ref [tail_elems $Int * %0 : $Builtin.Word] $_ContiguousArrayStorage<Int>
3735
%7 = metatype $@thin Array<Int>.Type
38-
%8 = function_ref @adoptStorageSpecialiedForInt : $@convention(method) (@guaranteed _ContiguousArrayStorage<Int>, Int, @thin Array<Int>.Type) -> (@owned Array<Int>, UnsafeMutablePointer<Int>)
39-
%9 = apply %8(%6, %2, %7) : $@convention(method) (@guaranteed _ContiguousArrayStorage<Int>, Int, @thin Array<Int>.Type) -> (@owned Array<Int>, UnsafeMutablePointer<Int>)
36+
%8 = function_ref @adoptStorageSpecialiedForInt : $@convention(method) (@guaranteed _ContiguousArrayStorage<Int>, Builtin.Word, @thin Array<Int>.Type) -> (@owned Array<Int>, UnsafeMutablePointer<Int>)
37+
%9 = apply %8(%6, %0, %7) : $@convention(method) (@guaranteed _ContiguousArrayStorage<Int>, Builtin.Word, @thin Array<Int>.Type) -> (@owned Array<Int>, UnsafeMutablePointer<Int>)
4038
strong_release %6 : $_ContiguousArrayStorage<Int>
4139
%10 = tuple_extract %9 : $(Array<Int>, UnsafeMutablePointer<Int>), 0
4240
%11 = tuple_extract %9 : $(Array<Int>, UnsafeMutablePointer<Int>), 1

0 commit comments

Comments
 (0)