Skip to content

Commit d7542aa

Browse files
eecksteinmeg-gupta
authored andcommitted
- test changes
1 parent 2fb30fd commit d7542aa

25 files changed

+127
-157
lines changed

test/AutoDiff/SILOptimizer/vjp_inlining.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func caller_of_with_control_flow(x: Float) -> Float {
3131
gradient(at: x, of: with_control_flow)
3232
}
3333
// CHECK-LABEL: decision {{.*}} $s12vjp_inlining17with_control_flowyS2fFTJrSpSr
34-
// CHECK-NEXT: "reverse-mode derivative of vjp_inlining.with_control_flow(_:)" inlined into "caller_of_with_control_flow"
34+
// CHECK-NEXT: "reverse-mode derivative of vjp_inlining.with_control_flow(_:)" inlined into "reverse-mode derivative of vjp_inlining.wrapperOnWithControlFlow(x:)"
3535

3636
// =============================================================== //
3737
// VJPs with control-flow are inlined into VJP callers
@@ -42,7 +42,7 @@ func wrapperOnWithControlFlow(x: Float) -> Float {
4242
return with_control_flow(x)
4343
}
4444
// CHECK-LABEL: decision {{.*}} $s12vjp_inlining17with_control_flowyS2fFTJrSpSr
45-
// CHECK-NEXT: "reverse-mode derivative of vjp_inlining.with_control_flow(_:)" inlined into "reverse-mode derivative of vjp_inlining.wrapperOnWithControlFlow(x:)"
45+
// CHECK-NEXT: "reverse-mode derivative of vjp_inlining.with_control_flow(_:)" inlined into "caller_of_with_control_flow"
4646

4747
// =============================================================== //
4848
// VJPs without control-flow are not inlined into non-VJP callers

test/ModuleInterface/ossa-modules/different-modes-have-different-hashes.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@
121121
// RUN: %target-swift-frontend -typecheck -sdk '' -module-cache-path %t/MCP.Osize -parse-stdlib -I %t %t/test.Osize.remark.swift -Rmodule-interface-rebuild -verify
122122
// RUN: ls %t/MCP.Osize | count 3
123123
// RUN: %target-swift-frontend -typecheck -sdk '' -module-cache-path %t/MCP.Osize -parse-stdlib -I %t %t/test.Osize.swift -Rmodule-interface-rebuild -verify
124-
// The grep at the end is an inverse so we are validating that the line doesn't have ossa.
125-
// RUN: %target-sil-opt -module-name SwiftModuleOsize %t/MCP.Osize/*.swiftmodule | grep '@$s16SwiftModuleOsize3fooAA5KlassCyF' | grep -v '[[]ossa[]]'
126124
// RUN: mv %t/MCP.Osize/*.swiftmodule %t/MCP.Osize/old
127125
// RUN: ls %t/MCP.Osize | count 2
128126
// RUN: %target-swift-frontend -typecheck -sdk '' -enable-ossa-modules -module-cache-path %t/MCP.Osize -parse-stdlib -I %t %t/test.Osize.remark.swift -Rmodule-interface-rebuild -verify
@@ -149,8 +147,6 @@
149147
// RUN: %target-swift-frontend -typecheck -sdk '' -module-cache-path %t/MCP.O -parse-stdlib -I %t %t/test.O.remark.swift -Rmodule-interface-rebuild -verify
150148
// RUN: ls %t/MCP.O | count 3
151149
// RUN: %target-swift-frontend -typecheck -sdk '' -module-cache-path %t/MCP.O -parse-stdlib -I %t %t/test.O.swift -Rmodule-interface-rebuild -verify
152-
// The grep at the end is an inverse so we are validating that the line doesn't have ossa.
153-
// RUN: %target-sil-opt -module-name SwiftModuleO %t/MCP.O/*.swiftmodule | grep '@$s12SwiftModuleO3fooAA5KlassCyF' | grep -v '[[]ossa[]]'
154150
// RUN: mv %t/MCP.O/*.swiftmodule %t/MCP.O/old
155151
// RUN: ls %t/MCP.O | count 2
156152
// RUN: %target-swift-frontend -typecheck -sdk '' -enable-ossa-modules -module-cache-path %t/MCP.O -parse-stdlib -I %t %t/test.O.remark.swift -Rmodule-interface-rebuild -verify

test/SIL/Parser/stage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
// CHECK: sil_stage raw
1212
//
1313
// Verify that the '[canonical]' attribute was set.
14-
// CHECK: sil [serialized] [canonical] @$s5stage21functionToReserializeyyF : $@convention(thin) () -> () {
14+
// CHECK: sil [serialized] [canonical] [ossa] @$s5stage21functionToReserializeyyF : $@convention(thin) () -> () {
1515
@inlinable
1616
public func functionToReserialize() {}

test/SIL/Serialization/function_param_convention.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Swift
66
import FunctionInput
77

88
// Make sure we can deserialize a SIL function with these various attributes.
9-
// CHECK: sil public_external [serialized] {{.*}}[canonical] @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
9+
// CHECK: sil public_external [serialized] {{.*}}[canonical] [ossa] @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
1010

1111
sil @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X
1212

test/SILOptimizer/assemblyvision_remark/chacha.swift

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,19 @@ func checkResult(_ plaintext: [UInt8]) {
2828

2929
@_semantics("optremark.sil-assembly-vision-remark-gen")
3030
public func run_ChaCha(_ N: Int) {
31-
let key = Array(repeating: UInt8(1), count: 32)
32-
let nonce = Array(repeating: UInt8(2), count: 12)
31+
let key = Array(repeating: UInt8(1), count: 32) // expected-remark {{release of type '}}
32+
let nonce = Array(repeating: UInt8(2), count: 12) // expected-remark {{release of type '}}
3333

34-
var checkedtext = Array(repeating: UInt8(0), count: 1024)
34+
var checkedtext = Array(repeating: UInt8(0), count: 1024) // expected-note {{of 'checkedtext}}
3535
ChaCha20.encrypt(bytes: &checkedtext, key: key, nonce: nonce)
3636
checkResult(checkedtext)
3737

3838

39-
var plaintext = Array(repeating: UInt8(0), count: 30720)
39+
var plaintext = Array(repeating: UInt8(0), count: 30720) // expected-note {{of 'plaintext}}
4040
for _ in 1...N {
4141
ChaCha20.encrypt(bytes: &plaintext, key: key, nonce: nonce)
4242
print(plaintext.first!) // expected-remark @:11 {{heap allocated ref of type '}}
4343
// expected-remark @-1:27 {{release of type '}}
4444
}
4545
} // expected-remark {{release of type '}}
46-
// expected-note @-7 {{of 'plaintext}}
47-
// expected-remark @-2 {{release of type '}}
48-
// expected-note @-16 {{of 'nonce}}
49-
// expected-remark @-4 {{release of type '}}
50-
// expected-note @-19 {{of 'key}}
51-
// expected-remark @-6 {{release of type '}}
52-
// expected-note @-18 {{of 'checkedtext}}
46+
// expected-remark @-1 {{release of type '}}

test/SILOptimizer/consuming_parameter.swift

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,11 @@ func bar() async {}
6969
// CHECK: [[PTR:%[^,]+]] = struct_extract [[UMP]]
7070
// CHECK: [[ADDR:%[^,]+]] = pointer_to_address [[PTR]]
7171
// CHECK: store [[CONSUMED_INSTANCE]] to [assign] [[ADDR]]
72-
// CHECK: [[PTR2:%[^,]+]] = struct_extract [[UMP]]
73-
// CHECK: [[ADDR2:%[^,]+]] = pointer_to_address [[PTR2]]
74-
// CHECK: [[OUT:%[^,]+]] = load [copy] [[ADDR2]]
75-
// CHECK: return [[OUT]]
7672
// CHECK-LABEL: } // end sil function 'write_to_pointer'
7773
@_silgen_name("write_to_pointer")
78-
public func write_to_pointer(o: consuming AnyObject, p: UnsafeMutablePointer<AnyObject>) -> AnyObject {
74+
public func write_to_pointer(o: consuming AnyObject, p: UnsafeMutablePointer<AnyObject>) -> () {
7975
// o should be destroyed here
8076
p.pointee = o
81-
return p.pointee
8277
}
8378

8479
extension C {
@@ -87,16 +82,11 @@ extension C {
8782
// CHECK: [[PTR:%[^,]+]] = struct_extract [[UMP]]
8883
// CHECK: [[ADDR:%[^,]+]] = pointer_to_address [[PTR]]
8984
// CHECK: store [[INSTANCE]] to [assign] [[ADDR]]
90-
// CHECK: [[ADDR2:%[^,]+]] = struct_extract [[UMP]]
91-
// CHECK: [[PTR2:%[^,]+]] = pointer_to_address [[ADDR2]]
92-
// CHECK: [[OUT:%[^,]+]] = load [copy] [[PTR2]]
93-
// CHECK: return [[OUT]]
9485
// CHECK-LABEL: } // end sil function 'write_to_pointer_method'
9586
@_silgen_name("write_to_pointer_method")
9687
consuming
97-
public func write_to_pointer(p: UnsafeMutablePointer<C>) -> C {
88+
public func write_to_pointer(p: UnsafeMutablePointer<C>) -> () {
9889
// o should be destroyed here
9990
p.pointee = self
100-
return p.pointee
10191
}
10292
}

test/SILOptimizer/cross-module-effects.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ public func noInlineNoEffects(_ x: X) -> Int {
3333
return x.i
3434
}
3535

36-
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] @$s6Module15inlineNoEffectsySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
36+
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] {{.*}}@$s6Module15inlineNoEffectsySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
3737
// CHECK-FR-MODULE-NEXT: [%0: noescape **, read c0.v**]
3838
// CHECK-FR-MODULE-NEXT: [global: ]
3939
// CHECK-FR-MODULE-NEXT: {{^[^[]}}
40-
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] @$s6Module15inlineNoEffectsySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
40+
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] {{.*}}@$s6Module15inlineNoEffectsySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
4141
// CHECK-LE-MODULE-NEXT: {{^[^[]}}
4242
@inlinable
4343
@inline(never)
@@ -65,11 +65,11 @@ public func noInlineWithEffects(_ x: X) -> Int {
6565
return x.i
6666
}
6767

68-
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] @$s6Module17inlineWithEffectsySiAA1XCF :
68+
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] {{.*}}@$s6Module17inlineWithEffectsySiAA1XCF :
6969
// CHECK-FR-MODULE-NEXT: [%0: noescape! **, read c0.v**]
7070
// CHECK-FR-MODULE-NEXT: [global: ]
7171
// CHECK-FR-MODULE-NEXT: {{^[^[]}}
72-
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] @$s6Module17inlineWithEffectsySiAA1XCF :
72+
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] {{.*}}@$s6Module17inlineWithEffectsySiAA1XCF :
7373
// CHECK-LE-MODULE-NEXT: [%0: noescape! **]
7474
// CHECK-LE-MODULE-NEXT: {{^[^[]}}
7575
@inlinable
@@ -79,15 +79,15 @@ public func inlineWithEffects(_ x: X) -> Int {
7979
return internalCallee(x)
8080
}
8181

82-
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] @loadWeakX_from : {{.*}} {
82+
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] [ossa] @loadWeakX_from : {{.*}} {
8383
// CHECK-LE-MODULE: {{^[^[]}}
8484
// CHECK-LE-MODULE-LABEL: } // end sil function 'loadWeakX_from'
8585

86-
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] @$s6Module12simpleInlineySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
86+
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] [ossa] @$s6Module12simpleInlineySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
8787
// CHECK-FR-MODULE-NEXT: [%0: noescape **, read c0.v**]
8888
// CHECK-FR-MODULE-NEXT: [global: ]
8989
// CHECK-FR-MODULE-NEXT: {{^[^[]}}
90-
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] @$s6Module12simpleInlineySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
90+
// CHECK-LE-MODULE-LABEL: sil [serialized] [noinline] [canonical] [ossa] @$s6Module12simpleInlineySiAA1XCF : $@convention(thin) (@guaranteed X) -> Int {
9191
// CHECK-LE-MODULE-NEXT: {{^[^[]}}
9292
@inlinable
9393
@inline(never)
@@ -100,7 +100,7 @@ public struct S {
100100
public weak var x: X?
101101
}
102102

103-
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] @loadWeakX_from : {{.*}} {
103+
// CHECK-FR-MODULE-LABEL: sil [serialized] [noinline] [canonical] [ossa] @loadWeakX_from : {{.*}} {
104104
// CHECK-FR-MODULE: [global: deinit_barrier]
105105
// CHECK-FR-MODULE-LABEL: } // end sil function 'loadWeakX_from'
106106
@inlinable

test/SILOptimizer/dead_alloc.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -O -emit-sil -parse-as-library %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -O -emit-sil -parse-as-library %s | grep -v debug_value | %FileCheck %s
22

33
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
44
// REQUIRES: swift_in_compiler
@@ -28,7 +28,6 @@ func g<T : P>(_ x : T) -> Bool {
2828

2929
// CHECK-LABEL: sil @$s10dead_alloc0A10AllocStackySbAA1XVF :
3030
// CHECK: bb0({{.*}}):
31-
// CHECK-NEXT: debug_value
3231
// CHECK-NEXT: integer_literal
3332
// CHECK-NEXT: struct
3433
// CHECK-NEXT: return
@@ -52,7 +51,6 @@ public func deadClassInstance() {
5251

5352
// CHECK-LABEL: sil @$s10dead_alloc0A13ManagedBufferyyF :
5453
// CHECK: bb0:
55-
// CHECK-NEXT: debug_value undef
5654
// CHECK-NEXT: tuple
5755
// CHECK-NEXT: return
5856
// CHECK-NEXT: } // end sil function '$s10dead_alloc0A13ManagedBufferyyF'

test/SILOptimizer/dead_bridging_code.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -O -module-name=test -emit-sil %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -O -module-name=test -emit-sil %s | grep -v debug_value | %FileCheck %s
22

33
// REQUIRES: objc_interop
44

@@ -10,7 +10,6 @@ class Myclass : NSObject {
1010

1111
// CHECK-LABEL: sil private [thunk] {{.*}}@$s4test7MyclassC3fooyySSFTo
1212
// CHECK: bb0(%0 : $NSString, %1 : $Myclass):
13-
// CHECK-NEXT: debug_value
1413
// CHECK-NEXT: tuple ()
1514
// CHECK-NEXT: return
1615
@objc func foo(_ s: String) {

test/SILOptimizer/existential_box_elimination.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public func publicWrapper(somethingGood: Bool) throws -> Int {
3535
// CHECK: [[F:%[0-9]+]] = function_ref @$s4test22internalImplementation13somethingGoods6ResultOySis5Error_pGSb_tF
3636
// CHECK: apply [[F]]
3737
// CHECK: switch_enum
38-
// CHECK: bb1:
38+
// CHECK: bb1({{%.*}} : $Int):
3939
// CHECK-NOT: alloc_existential_box
4040
// CHECK: } // end sil function '$s4test0A13WithForceCast13somethingGoodSiSb_tF'
4141
@inline(never)
@@ -51,7 +51,7 @@ public func testWithForceCast(somethingGood: Bool) -> Int {
5151
// CHECK: [[F:%[0-9]+]] = function_ref @$s4test22internalImplementation13somethingGoods6ResultOySis5Error_pGSb_tF
5252
// CHECK: apply [[F]]
5353
// CHECK: switch_enum
54-
// CHECK: bb1:
54+
// CHECK: bb1({{%.*}} : $Int):
5555
// CHECK-NOT: alloc_existential_box
5656
// CHECK: } // end sil function '$s4test0A19WithMultipleCatches13somethingGoodSiSb_tF'
5757
@inline(never)

test/SILOptimizer/functionsigopts_attrs.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ public func caller_guaranteed_eagerMove(s: S) {
4646
// CHECK-LABEL: sil {{.*}}@$s4main22callee_owned_eagerMoveyyAA1P_pnFTf4e_nTf4g_n : {{.*}}{
4747
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @_eagerMove $
4848
// CHECK-LABEL: } // end sil function '$s4main22callee_owned_eagerMoveyyAA1P_pnFTf4e_nTf4g_n'
49-
// CHECK-LABEL: sil {{.*}}@$s4main22callee_owned_eagerMoveyyAA1P_pnFTf4e_nAA1SV_Tg5Tf4gX_n : {{.*}}{
50-
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @_eagerMove $
51-
// CHECK-LABEL: } // end sil function '$s4main22callee_owned_eagerMoveyyAA1P_pnFTf4e_nAA1SV_Tg5Tf4gX_n'
5249
@inline(never)
5350
func callee_owned_eagerMove(@_eagerMove _ p: __owned P) {
5451
p.foo()

test/SILOptimizer/package-cmo-closure.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ public func reproduce(_ e: Something) {
3232
}
3333

3434
// use(_:)
35-
// CHECK: sil [serialized_for_package] [canonical] @$s3Lib3useyySiyXEF : $@convention(thin) (@guaranteed @noescape @callee_guaranteed () -> Int) -> () {
36-
// CHECK: bb0(%0 : $@noescape @callee_guaranteed () -> Int):
35+
// CHECK: sil [serialized_for_package] [canonical] [ossa] @$s3Lib3useyySiyXEF : $@convention(thin) (@guaranteed @noescape @callee_guaranteed () -> Int) -> () {
36+
// CHECK: bb0(%0 : @guaranteed $@noescape @callee_guaranteed () -> Int):
3737
// CHECK: [[RESULT:%.*]] = tuple ()
3838
// CHECK: return [[RESULT]] : $()
3939
// CHECK: } // end sil function '$s3Lib3useyySiyXEF'
4040

4141
// closure #1 in reproduce(_:)
42-
// CHECK: sil shared [serialized] [canonical] @$s3Lib9reproduceyyAA9SomethingVFSiyXEfU_ : $@convention(thin) (@in_guaranteed Something) -> Int {
42+
// CHECK: sil shared [serialized] [canonical] [ossa] @$s3Lib9reproduceyyAA9SomethingVFSiyXEfU_ : $@convention(thin) (@in_guaranteed Something) -> Int {
4343
// function_ref Something.f()
4444
// CHECK: bb0(%0 : @closureCapture $*Something):
4545
// CHECK: [[REF:%.*]] = function_ref @$s3Lib9SomethingV1fSiyF : $@convention(method) (@in_guaranteed Something) -> Int
@@ -48,13 +48,13 @@ public func reproduce(_ e: Something) {
4848
// CHECK: } // end sil function '$s3Lib9reproduceyyAA9SomethingVFSiyXEfU_'
4949

5050
// Something.f()
51-
// CHECK: sil [serialized_for_package] [canonical] @$s3Lib9SomethingV1fSiyF : $@convention(method) (@in_guaranteed Something) -> Int {
51+
// CHECK: sil [serialized_for_package] [canonical] [ossa] @$s3Lib9SomethingV1fSiyF : $@convention(method) (@in_guaranteed Something) -> Int {
5252

5353
// Something.init()
54-
// CHECK: sil [serialized_for_package] [canonical] @$s3Lib9SomethingVACycfC : $@convention(method) (@thin Something.Type) -> @out Something {
54+
// CHECK: sil [serialized_for_package] [canonical] [ossa] @$s3Lib9SomethingVACycfC : $@convention(method) (@thin Something.Type) -> @out Something {
5555

5656
// reproduce(_:)
57-
// CHECK: sil [serialized] [canonical] @$s3Lib9reproduceyyAA9SomethingVF : $@convention(thin) (@in_guaranteed Something) -> () {
57+
// CHECK: sil [serialized] [canonical] [ossa] @$s3Lib9reproduceyyAA9SomethingVF : $@convention(thin) (@in_guaranteed Something) -> () {
5858
// CHECK: bb0(%0 : $*Something):
5959
// CHECK: [[CLOSURE_PTR:%.*]] = function_ref @$s3Lib9reproduceyyAA9SomethingVFSiyXEfU_ : $@convention(thin) (@in_guaranteed Something) -> Int
6060
// CHECK: [[CLOSURE_W_ARG:%.*]] = partial_apply [callee_guaranteed] [on_stack] [[CLOSURE_PTR]](%0) : $@convention(thin) (@in_guaranteed Something) -> Int

test/SILOptimizer/package-cmo-deserialize-for-external-client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@
6969
/// Verify functions and tables are optimized with Package CMO in Lib.
7070
// RUN: %FileCheck -check-prefix=CHECK-LIB %s < %t/Lib.sil
7171

72-
// CHECK-LIB: sil [serialized] [exact_self_class] [canonical] @$s3Lib3PubCyACSicfC : $@convention(method) (Int, @thick Pub.Type) -> @owned Pub {
72+
// CHECK-LIB: sil [serialized] [exact_self_class] [canonical] [ossa] @$s3Lib3PubCyACSicfC : $@convention(method) (Int, @thick Pub.Type) -> @owned Pub {
7373
// CHECK-LIB: function_ref @$s3Lib3PubCyACSicfc : $@convention(method) (Int, @owned Pub) -> @owned Pub
7474

7575
// Pub.pkgVar.getter
76-
// CHECK-LIB: sil package [serialized_for_package] [canonical] @$s3Lib3PubC6pkgVarSivg : $@convention(method) (@guaranteed Pub) -> Int {
76+
// CHECK-LIB: sil package [serialized_for_package] [canonical] [ossa] @$s3Lib3PubC6pkgVarSivg : $@convention(method) (@guaranteed Pub) -> Int {
7777

7878
// CHECK-LIB: sil_vtable [serialized_for_package] Pub {
7979
// CHECK-LIB: #Pub.pubVar!getter: (Pub) -> () -> Int : @$s3Lib3PubC6pubVarSivg // Pub.pubVar.getter

test/SILOptimizer/package-cmo-inlinable-ufi.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,30 +76,30 @@ package func usePkgStruct(_ arg: Int) -> PkgStruct {
7676

7777
//--- Lib.swift
7878

79-
// CHECK: sil package [serialized_for_package] [canonical] @$s3Lib6libPkgyAA0C6StructVSiF : $@convention(thin) (Int) -> @out PkgStruct {
79+
// CHECK: sil package [serialized_for_package] [canonical] [ossa] @$s3Lib6libPkgyAA0C6StructVSiF : $@convention(thin) (Int) -> @out PkgStruct {
8080
// CHECK: struct $PkgStruct
81-
// CHECK: store {{.*}} to %0 : $*PkgStruct
81+
// CHECK: store {{.*}} to [trivial] %0 : $*PkgStruct
8282

83-
// CHECK: sil [serialized_for_package] [canonical] @$s3Lib6libPubyAA0C6StructVSiF : $@convention(thin) (Int) -> @out PubStruct {
83+
// CHECK: sil [serialized_for_package] [canonical] [ossa] @$s3Lib6libPubyAA0C6StructVSiF : $@convention(thin) (Int) -> @out PubStruct {
8484
// CHECK: struct $PubStruct
85-
// CHECK: store {{.*}} to %0 : $*PubStruct
85+
// CHECK: store {{.*}} to [trivial] %0 : $*PubStruct
8686

87-
// CHECK: sil package [serialized_for_package] [canonical] @$s3Lib9libUfiPkgyAA0cD6StructVSiF : $@convention(thin) (Int) -> @out UfiPkgStruct {
87+
// CHECK: sil package [serialized_for_package] [canonical] [ossa] @$s3Lib9libUfiPkgyAA0cD6StructVSiF : $@convention(thin) (Int) -> @out UfiPkgStruct {
8888
// CHECK: struct $UfiPkgStruct
89-
// CHECK: store {{.*}} to %0 : $*UfiPkgStruct
89+
// CHECK: store {{.*}} to [trivial] %0 : $*UfiPkgStruct
9090

9191
/// @inlinable package func inLibUfiPkg(_ arg: Int) -> UfiPkgStruct
92-
// CHECK: sil [serialized] [canonical] @$s3Lib02inA6UfiPkgyAA0cD6StructVSiF : $@convention(thin) (Int) -> @out UfiPkgStruct {
92+
// CHECK: sil [serialized] [canonical] [ossa] @$s3Lib02inA6UfiPkgyAA0cD6StructVSiF : $@convention(thin) (Int) -> @out UfiPkgStruct {
9393
// CHECK: function_ref @$s3Lib12UfiPkgStructVyACSicfC : $@convention(method) (Int, @thin UfiPkgStruct.Type) -> @out UfiPkgStruct
9494
// CHECK: function_ref @$s3Lib12UfiPkgStructV03ufiC0SivM : $@yield_once @convention(method) (@inout UfiPkgStruct) -> @yields @inout Int
9595

9696
/// @inlinable func inLibUfiHid(_ arg: Int) -> UfiHidStruct
97-
// CHECK: sil [serialized] [canonical] @$s3Lib02inA6UfiHidyAA0cD6StructVSiF : $@convention(thin) (Int) -> @out UfiHidStruct {
97+
// CHECK: sil [serialized] [canonical] [ossa] @$s3Lib02inA6UfiHidyAA0cD6StructVSiF : $@convention(thin) (Int) -> @out UfiHidStruct {
9898
// CHECK: function_ref @$s3Lib12UfiHidStructVyACSicfC : $@convention(method) (Int, @thin UfiHidStruct.Type) -> @out UfiHidStruct
9999
// CHECK: function_ref @$s3Lib12UfiHidStructV03ufiC0SivM : $@yield_once @convention(method) (@inout UfiHidStruct) -> @yields @inout Int
100100

101101
/// @inlinable public func inLibPub(_ arg: Int) -> PubStruct
102-
// CHECK: sil [serialized] [canonical] @$s3Lib02inA3PubyAA0C6StructVSiF : $@convention(thin) (Int) -> @out PubStruct {
102+
// CHECK: sil [serialized] [canonical] [ossa] @$s3Lib02inA3PubyAA0C6StructVSiF : $@convention(thin) (Int) -> @out PubStruct {
103103
// CHECK: function_ref @$s3Lib9PubStructVyACSicfC : $@convention(method) (Int, @thin PubStruct.Type) -> @out PubStruct
104104
// CHECK: function_ref @$s3Lib9PubStructV3pubSivM : $@yield_once @convention(method) (@inout PubStruct) -> @yields @inout Int
105105

0 commit comments

Comments
 (0)