Skip to content

Commit cb5249b

Browse files
authored
Merge pull request #11718 from gottesmm/pr-4416da8ac96efc95289f869dec7b63a6a0fb7e05
2 parents 158c500 + b2550ec commit cb5249b

File tree

7 files changed

+51
-38
lines changed

7 files changed

+51
-38
lines changed

lib/SIL/SILPrinter.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,10 @@ class SILPrinter : public SILVisitor<SILPrinter> {
576576
*this << '(';
577577
ArrayRef<SILArgument *> Args = BB->getArguments();
578578

579-
// If SIL ownership is enabled, print out ownership of SILArguments.
580-
if (BB->getModule().getOptions().EnableSILOwnership) {
579+
// If SIL ownership is enabled and the given function has not had ownership
580+
// stripped out, print out ownership of SILArguments.
581+
if (BB->getModule().getOptions().EnableSILOwnership &&
582+
BB->getParent()->hasQualifiedOwnership()) {
581583
*this << getIDAndTypeAndOwnership(Args[0]);
582584
for (SILArgument *Arg : Args.drop_front()) {
583585
*this << ", " << getIDAndTypeAndOwnership(Arg);

lib/SIL/SILVerifier.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3875,6 +3875,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
38753875
matched = false;
38763876
}
38773877

3878+
// If we do not have qualified ownership, do not check ownership.
3879+
if (!F.hasQualifiedOwnership()) {
3880+
return;
3881+
}
3882+
38783883
if (bbarg->getOwnershipKind() != ownershipkind) {
38793884
llvm::errs() << what << " ownership kind mismatch!\n";
38803885
llvm::errs() << " argument: " << bbarg->getOwnershipKind() << '\n';
@@ -4098,6 +4103,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
40984103
auto *CBI = dyn_cast<CondBranchInst>(TI);
40994104
if (!CBI)
41004105
continue;
4106+
41014107
if (isCriticalEdgePred(CBI, CondBranchInst::TrueIdx)) {
41024108
require(
41034109
llvm::all_of(CBI->getTrueArgs(),

lib/SILOptimizer/Transforms/OwnershipModelEliminator.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ struct OwnershipModelEliminator : SILModuleTransform {
268268
OwnershipModelEliminatorVisitor Visitor(B);
269269

270270
for (auto &BB : F) {
271+
// Change all arguments to have ValueOwnershipKind::Any.
272+
for (auto *Arg : BB.getArguments()) {
273+
Arg->setOwnershipKind(ValueOwnershipKind::Any);
274+
}
275+
271276
for (auto II = BB.begin(), IE = BB.end(); II != IE;) {
272277
// Since we are going to be potentially removing instructions, we need
273278
// to make sure to increment our iterator before we perform any

test/SILGen/addressors.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ struct A {
3232
}
3333

3434
// CHECK-LABEL: sil hidden @_T010addressors1AV9subscripts5Int32VAFcflu : $@convention(method) (Int32, A) -> UnsafePointer<Int32>
35-
// CHECK: bb0([[INDEX:%.*]] : @trivial $Int32, [[SELF:%.*]] : @trivial $A):
35+
// CHECK: bb0([[INDEX:%.*]] : $Int32, [[SELF:%.*]] : $A):
3636
// CHECK: [[BASE:%.*]] = struct_extract [[SELF]] : $A, #A.base
3737
// CHECK: [[T0:%.*]] = struct_extract [[BASE]] : $UnsafeMutablePointer<Int32>, #UnsafeMutablePointer._rawValue
3838
// CHECK: [[T1:%.*]] = struct $UnsafePointer<Int32> ([[T0]] : $Builtin.RawPointer)
3939
// CHECK: return [[T1]] : $UnsafePointer<Int32>
4040

4141
// CHECK-LABEL: sil hidden @_T010addressors1AV9subscripts5Int32VAFcfau : $@convention(method) (Int32, @inout A) -> UnsafeMutablePointer<Int32>
42-
// CHECK: bb0([[INDEX:%.*]] : @trivial $Int32, [[SELF:%.*]] : @trivial $*A):
42+
// CHECK: bb0([[INDEX:%.*]] : $Int32, [[SELF:%.*]] : $*A):
4343
// CHECK: [[READ:%.*]] = begin_access [read] [static] [[SELF]] : $*A
4444
// CHECK: [[T0:%.*]] = struct_element_addr [[READ]] : $*A, #A.base
4545
// CHECK: [[BASE:%.*]] = load [[T0]] : $*UnsafeMutablePointer<Int32>
@@ -132,7 +132,7 @@ struct B : Subscriptable {
132132
}
133133

134134
// CHECK-LABEL: sil hidden @_T010addressors6test_ByAA1BVzF : $@convention(thin) (@inout B) -> () {
135-
// CHECK: bb0([[B:%.*]] : @trivial $*B):
135+
// CHECK: bb0([[B:%.*]] : $*B):
136136
// CHECK: [[T0:%.*]] = integer_literal $Builtin.Int32, 0
137137
// CHECK: [[INDEX:%.*]] = struct $Int32 ([[T0]] : $Builtin.Int32)
138138
// CHECK: [[RHS:%.*]] = integer_literal $Builtin.Int32, 7
@@ -162,7 +162,7 @@ struct CArray<T> {
162162
func id_int(_ i: Int32) -> Int32 { return i }
163163

164164
// CHECK-LABEL: sil hidden @_T010addressors11test_carrays5Int32VAA6CArrayVyA2DcGzF : $@convention(thin) (@inout CArray<(Int32) -> Int32>) -> Int32 {
165-
// CHECK: bb0([[ARRAY:%.*]] : @trivial $*CArray<(Int32) -> Int32>):
165+
// CHECK: bb0([[ARRAY:%.*]] : $*CArray<(Int32) -> Int32>):
166166
func test_carray(_ array: inout CArray<(Int32) -> Int32>) -> Int32 {
167167
// CHECK: [[WRITE:%.*]] = begin_access [modify] [static] [[ARRAY]] : $*CArray<(Int32) -> Int32>
168168
// CHECK: [[T0:%.*]] = function_ref @_T010addressors6CArrayV9subscriptxSicfau :
@@ -218,7 +218,7 @@ func make_int() -> Int32 { return 0 }
218218
func take_int_inout(_ value: inout Int32) {}
219219

220220
// CHECK-LABEL: sil hidden @_T010addressors6test_ds5Int32VAA1DVzF : $@convention(thin) (@inout D) -> Int32
221-
// CHECK: bb0([[ARRAY:%.*]] : @trivial $*D):
221+
// CHECK: bb0([[ARRAY:%.*]] : $*D):
222222
func test_d(_ array: inout D) -> Int32 {
223223
// CHECK: [[T0:%.*]] = function_ref @_T010addressors8make_ints5Int32VyF
224224
// CHECK: [[V:%.*]] = apply [[T0]]()
@@ -255,7 +255,7 @@ struct E {
255255
}
256256

257257
// CHECK-LABEL: sil hidden @_T010addressors6test_eyAA1EVF
258-
// CHECK: bb0([[E:%.*]] : @trivial $E):
258+
// CHECK: bb0([[E:%.*]] : $E):
259259
// CHECK: [[T0:%.*]] = function_ref @_T010addressors1EV5values5Int32Vfau
260260
// CHECK: [[T1:%.*]] = apply [[T0]]([[E]])
261261
// CHECK: [[T2:%.*]] = struct_extract [[T1]]
@@ -285,7 +285,7 @@ func test_f0(_ f: F) -> Int32 {
285285
return f.value
286286
}
287287
// CHECK-LABEL: sil hidden @_T010addressors7test_f0s5Int32VAA1FCF : $@convention(thin) (@owned F) -> Int32 {
288-
// CHECK: bb0([[SELF:%0]] : @owned $F):
288+
// CHECK: bb0([[SELF:%0]] : $F):
289289
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1FC5values5Int32Vflo : $@convention(method) (@guaranteed F) -> (UnsafePointer<Int32>, @owned Builtin.NativeObject)
290290
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
291291
// CHECK: [[PTR:%.*]] = tuple_extract [[T0]] : $(UnsafePointer<Int32>, Builtin.NativeObject), 0
@@ -302,7 +302,7 @@ func test_f1(_ f: F) {
302302
f.value = 14
303303
}
304304
// CHECK-LABEL: sil hidden @_T010addressors7test_f1yAA1FCF : $@convention(thin) (@owned F) -> () {
305-
// CHECK: bb0([[SELF:%0]] : @owned $F):
305+
// CHECK: bb0([[SELF:%0]] : $F):
306306
// CHECK: [[T0:%.*]] = integer_literal $Builtin.Int32, 14
307307
// CHECK: [[VALUE:%.*]] = struct $Int32 ([[T0]] : $Builtin.Int32)
308308
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1FC5values5Int32Vfao : $@convention(method) (@guaranteed F) -> (UnsafeMutablePointer<Int32>, @owned Builtin.NativeObject)
@@ -329,7 +329,7 @@ class G {
329329
}
330330
}
331331
// CHECK-LABEL: sil hidden [transparent] @_T010addressors1GC5values5Int32Vfg : $@convention(method) (@guaranteed G) -> Int32 {
332-
// CHECK: bb0([[SELF:%0]] : @guaranteed $G):
332+
// CHECK: bb0([[SELF:%0]] : $G):
333333
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1GC5values5Int32Vflo : $@convention(method) (@guaranteed G) -> (UnsafePointer<Int32>, @owned Builtin.NativeObject)
334334
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
335335
// CHECK: [[PTR:%.*]] = tuple_extract [[T0]] : $(UnsafePointer<Int32>, Builtin.NativeObject), 0
@@ -342,7 +342,7 @@ class G {
342342
// CHECK: return [[VALUE]] : $Int32
343343

344344
// CHECK-LABEL: sil hidden [transparent] @_T010addressors1GC5values5Int32Vfs : $@convention(method) (Int32, @guaranteed G) -> () {
345-
// CHECK: bb0([[VALUE:%0]] : @trivial $Int32, [[SELF:%1]] : @guaranteed $G):
345+
// CHECK: bb0([[VALUE:%0]] : $Int32, [[SELF:%1]] : $G):
346346
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1GC5values5Int32Vfao : $@convention(method) (@guaranteed G) -> (UnsafeMutablePointer<Int32>, @owned Builtin.NativeObject)
347347
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
348348
// CHECK: [[PTR:%.*]] = tuple_extract [[T0]] : $(UnsafeMutablePointer<Int32>, Builtin.NativeObject), 0
@@ -355,15 +355,15 @@ class G {
355355

356356
// materializeForSet callback for G.value
357357
// CHECK-LABEL: sil private [transparent] @_T010addressors1GC5values5Int32VfmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout G, @thick G.Type) -> () {
358-
// CHECK: bb0([[BUFFER:%0]] : @trivial $Builtin.RawPointer, [[STORAGE:%1]] : @trivial $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : @trivial $*G, [[SELFTYPE:%3]] : @trivial $@thick G.Type):
358+
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $*G, [[SELFTYPE:%3]] : $@thick G.Type):
359359
// CHECK: [[T0:%.*]] = project_value_buffer $Builtin.NativeObject in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
360360
// CHECK: [[OWNER:%.*]] = load [[T0]]
361361
// CHECK: strong_release [[OWNER]] : $Builtin.NativeObject
362362
// CHECK: dealloc_value_buffer $Builtin.NativeObject in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
363363

364364
// materializeForSet for G.value
365365
// CHECK-LABEL: sil hidden [transparent] @_T010addressors1GC5values5Int32Vfm : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed G) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
366-
// CHECK: bb0([[BUFFER:%0]] : @trivial $Builtin.RawPointer, [[STORAGE:%1]] : @trivial $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : @guaranteed $G):
366+
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $G):
367367
// Call the addressor.
368368
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1GC5values5Int32Vfao : $@convention(method) (@guaranteed G) -> (UnsafeMutablePointer<Int32>, @owned Builtin.NativeObject)
369369
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
@@ -405,7 +405,7 @@ func test_h0(_ f: H) -> Int32 {
405405
return f.value
406406
}
407407
// CHECK-LABEL: sil hidden @_T010addressors7test_h0s5Int32VAA1HCF : $@convention(thin) (@owned H) -> Int32 {
408-
// CHECK: bb0([[SELF:%0]] : @owned $H):
408+
// CHECK: bb0([[SELF:%0]] : $H):
409409
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1HC5values5Int32Vflp : $@convention(method) (@guaranteed H) -> (UnsafePointer<Int32>, @owned Optional<Builtin.NativeObject>)
410410
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
411411
// CHECK: [[PTR:%.*]] = tuple_extract [[T0]] : $(UnsafePointer<Int32>, Optional<Builtin.NativeObject>), 0
@@ -422,7 +422,7 @@ func test_h1(_ f: H) {
422422
f.value = 14
423423
}
424424
// CHECK-LABEL: sil hidden @_T010addressors7test_h1yAA1HCF : $@convention(thin) (@owned H) -> () {
425-
// CHECK: bb0([[SELF:%0]] : @owned $H):
425+
// CHECK: bb0([[SELF:%0]] : $H):
426426
// CHECK: [[T0:%.*]] = integer_literal $Builtin.Int32, 14
427427
// CHECK: [[VALUE:%.*]] = struct $Int32 ([[T0]] : $Builtin.Int32)
428428
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1HC5values5Int32VfaP : $@convention(method) (@guaranteed H) -> (UnsafeMutablePointer<Int32>, @owned Optional<Builtin.NativeObject>)
@@ -449,7 +449,7 @@ class I {
449449
}
450450
}
451451
// CHECK-LABEL: sil hidden [transparent] @_T010addressors1IC5values5Int32Vfg : $@convention(method) (@guaranteed I) -> Int32 {
452-
// CHECK: bb0([[SELF:%0]] : @guaranteed $I):
452+
// CHECK: bb0([[SELF:%0]] : $I):
453453
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1IC5values5Int32Vflp : $@convention(method) (@guaranteed I) -> (UnsafePointer<Int32>, @owned Optional<Builtin.NativeObject>)
454454
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
455455
// CHECK: [[PTR:%.*]] = tuple_extract [[T0]] : $(UnsafePointer<Int32>, Optional<Builtin.NativeObject>), 0
@@ -462,7 +462,7 @@ class I {
462462
// CHECK: return [[VALUE]] : $Int32
463463

464464
// CHECK-LABEL: sil hidden [transparent] @_T010addressors1IC5values5Int32Vfs : $@convention(method) (Int32, @guaranteed I) -> () {
465-
// CHECK: bb0([[VALUE:%0]] : @trivial $Int32, [[SELF:%1]] : @guaranteed $I):
465+
// CHECK: bb0([[VALUE:%0]] : $Int32, [[SELF:%1]] : $I):
466466
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1IC5values5Int32VfaP : $@convention(method) (@guaranteed I) -> (UnsafeMutablePointer<Int32>, @owned Optional<Builtin.NativeObject>)
467467
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
468468
// CHECK: [[PTR:%.*]] = tuple_extract [[T0]] : $(UnsafeMutablePointer<Int32>, Optional<Builtin.NativeObject>), 0
@@ -475,14 +475,14 @@ class I {
475475

476476
// materializeForSet callback for I.value
477477
// CHECK-LABEL: sil private [transparent] @_T010addressors1IC5values5Int32VfmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout I, @thick I.Type) -> () {
478-
// CHECK: bb0([[BUFFER:%0]] : @trivial $Builtin.RawPointer, [[STORAGE:%1]] : @trivial $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : @trivial $*I, [[SELFTYPE:%3]] : @trivial $@thick I.Type):
478+
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $*I, [[SELFTYPE:%3]] : $@thick I.Type):
479479
// CHECK: [[T0:%.*]] = project_value_buffer $Optional<Builtin.NativeObject> in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
480480
// CHECK: [[OWNER:%.*]] = load [[T0]]
481481
// CHECK: strong_unpin [[OWNER]] : $Optional<Builtin.NativeObject>
482482
// CHECK: dealloc_value_buffer $Optional<Builtin.NativeObject> in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
483483

484484
// CHECK-LABEL: sil hidden [transparent] @_T010addressors1IC5values5Int32Vfm : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed I) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
485-
// CHECK: bb0([[BUFFER:%0]] : @trivial $Builtin.RawPointer, [[STORAGE:%1]] : @trivial $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : @guaranteed $I):
485+
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $I):
486486
// Call the addressor.
487487
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_T010addressors1IC5values5Int32VfaP : $@convention(method) (@guaranteed I) -> (UnsafeMutablePointer<Int32>, @owned Optional<Builtin.NativeObject>)
488488
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])

test/SILGen/builtins.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ func bindMemory<T>(ptr: Builtin.RawPointer, idx: Builtin.Word, _: T.Type) {
939939

940940
// SIL Test. This makes sure that we properly clean up in -Onone SIL.
941941
// CANONICAL-LABEL: sil hidden @_T08builtins6retain{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@owned Builtin.NativeObject) -> () {
942-
// CANONICAL: bb0([[P:%.*]] : @owned $Builtin.NativeObject):
942+
// CANONICAL: bb0([[P:%.*]] : $Builtin.NativeObject):
943943
// CANONICAL-NOT: retain
944944
// CANONICAL-NOT: release
945945
// CANONICAL: } // end sil function '_T08builtins6retain{{[_0-9a-zA-Z]*}}F'
@@ -961,7 +961,7 @@ func retain(ptr: Builtin.NativeObject) {
961961

962962
// SIL Test. Make sure even in -Onone code, we clean this up properly:
963963
// CANONICAL-LABEL: sil hidden @_T08builtins7release{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@owned Builtin.NativeObject) -> () {
964-
// CANONICAL: bb0([[P:%.*]] : @owned $Builtin.NativeObject):
964+
// CANONICAL: bb0([[P:%.*]] : $Builtin.NativeObject):
965965
// CANONICAL-NEXT: debug_value
966966
// CANONICAL-NEXT: tuple
967967
// CANONICAL-NEXT: strong_release [[P]]

test/SILOptimizer/capture_promotion_generic_context_ownership.sil

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ entry(%0 : @trivial $*T, %1 : @trivial $Int):
3838
protocol P {}
3939

4040
// CHECK-LABEL: sil @_T022generic_promotable_boxTf2ni_n : $@convention(thin) <T> (@in T, Builtin.Int32) -> Builtin.Int32
41-
// CHECK: bb0([[ARG0:%.*]] : @trivial $*T, [[ARG1:%.*]] : @trivial $Builtin.Int32):
41+
// CHECK: bb0([[ARG0:%.*]] : $*T, [[ARG1:%.*]] : $Builtin.Int32):
4242
// CHECK-NEXT: return [[ARG1]] : $Builtin.Int32
4343

4444
sil @generic_promotable_box : $@convention(thin) <T> (@in T, @owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
@@ -50,7 +50,7 @@ entry(%0 : @trivial $*T, %b : @owned $<τ_0_0> { var τ_0_0 } <Int>):
5050
}
5151

5252
// CHECK-LABEL: sil @call_generic_promotable_box_from_different_generic
53-
// CHECK: bb0([[ARG0:%.*]] : @trivial $*T, [[ARG1:%.*]] : @trivial $*U, [[ARG2:%.*]] : @trivial $Builtin.Int32):
53+
// CHECK: bb0([[ARG0:%.*]] : $*T, [[ARG1:%.*]] : $*U, [[ARG2:%.*]] : $Builtin.Int32):
5454
// CHECK-NEXT: destroy_addr [[ARG0]] : $*T
5555
// CHECK-NEXT: destroy_addr [[ARG1]] : $*U
5656
// CHECK: [[F:%.*]] = function_ref @_T022generic_promotable_boxTf2ni_n : $@convention(thin) <τ_0_0> (@in τ_0_0, Builtin.Int32) -> Builtin.Int32
@@ -81,7 +81,7 @@ struct R<T> {
8181
// take argument of a type E<(R<T>) -> Builtin.Int32>, which used
8282
// to be a slot inside a box.
8383
// CHECK-LABEL: sil @_T023generic_promotable_box2Tf2nni_n : $@convention(thin) <T> (@in R<T>, @in Builtin.Int32, @owned E<(R<T>) -> Builtin.Int32>) -> ()
84-
// CHECK: bb0([[ARG0:%.*]] : @trivial $*R<T>, [[ARG1:%.*]] : @trivial $*Builtin.Int32, [[ARG2:%.*]] : @owned $E<(R<T>) -> Builtin.Int32>):
84+
// CHECK: bb0([[ARG0:%.*]] : $*R<T>, [[ARG1:%.*]] : $*Builtin.Int32, [[ARG2:%.*]] : $E<(R<T>) -> Builtin.Int32>):
8585
// CHECK-NOT: project_box
8686
// CHECK: switch_enum [[ARG2]] : $E<(R<T>) -> Builtin.Int32>
8787
// CHECK-NOT: project_box
@@ -109,7 +109,7 @@ exit:
109109
// Check that alloc_box was eliminated and a specialized version of the
110110
// closure is invoked.
111111
// CHECK-LABEL: sil @call_generic_promotable_box_from_different_generic2
112-
// CHECK: bb0([[ARG0:%.*]] : @trivial $*R<T>, [[ARG1:%.*]] : @trivial $*E<(R<U>) -> Builtin.Int32>, [[ARG2:%.*]] : @trivial $*Builtin.Int32):
112+
// CHECK: bb0([[ARG0:%.*]] : $*R<T>, [[ARG1:%.*]] : $*E<(R<U>) -> Builtin.Int32>, [[ARG2:%.*]] : $*Builtin.Int32):
113113
// CHECK: %3 = load [[ARG1]] : $*E<(R<U>) -> Builtin.Int32>
114114
// CHECK: [[F:%.*]] = function_ref @_T023generic_promotable_box2Tf2nni_n : $@convention(thin) <τ_0_0> (@in R<τ_0_0>, @in Builtin.Int32, @owned E<(R<τ_0_0>) -> Builtin.Int32>) -> ()
115115
// CHECK-NEXT: [[CLOSURE:%.*]] = partial_apply [[F]]<U>(%2, %3)

0 commit comments

Comments
 (0)