Files
swift-mirror/test/SILOptimizer/globalopt-iter.sil
2023-05-22 15:34:26 +02:00

30 lines
723 B
Plaintext

// RUN: %target-sil-opt -enable-sil-verify-all %s -object-outliner | %FileCheck %s
// REQUIRES: swift_in_compiler
import Builtin
import Swift
class B { }
class E : B { }
// CHECK: sil @patatino : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK-NEXT: integer_literal
// CHECK-NEXT: global_value @patatinoTv_ : $B
// CHECK-NEXT: strong_retain
// CHECK-NEXT: strong_release
// CHECK-NEXT: tuple ()
// CHECK-NEXT: return
// CHECK-NEXT: }
sil @patatino : $@convention(thin) () -> () {
%0 = integer_literal $Builtin.Word, 0
%1 = alloc_ref [tail_elems $Int64 * %0 : $Builtin.Word] $B
%2 = end_cow_mutation %1 : $B
set_deallocating %2 : $B
dealloc_ref %2 : $B
%45 = tuple ()
return %45 : $()
}