Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/SILOptimizer/abcopt_large_cfg.sil.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bb0(%0: $Int32, %1: $Bool, %2: @owned $ArrayInt):

// CHECK-LABEL: sil [ossa] @test_very_deep_domtree :

// Currently there is nothing ot check here, because the optimization bails in
// Currently there is nothing to check here, because the optimization bails in
// this case.
// In future we might check that even with a deep domtree it can hoist the check.

Expand Down
4 changes: 2 additions & 2 deletions test/SILOptimizer/access_enforcement_selection.sil
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sil [ossa] @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @gu
sil [ossa] @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()

// Test static enforcement of box addresses that escape via closure
// partial_applys.
// partial_applies.
// application.
// CHECK-LABEL: sil hidden [ossa] @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
// CHECK: bb0:
Expand Down Expand Up @@ -99,7 +99,7 @@ bb0:
return %9 : $()
}

sil [dynamically_replacable] [ossa] @closureCapturingByStorageAddress2 : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
sil [dynamically_replaceable] [ossa] @closureCapturingByStorageAddress2 : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()

// Make sure that we handle dynamic_function_ref.
sil hidden [ossa] @escapeAsArgumentToPartialApplyDynamic : $@convention(thin) () -> () {
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/access_storage_analysis.sil
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ bb3(%7 : $Builtin.RawPointer):
return %10 : $Int64
}

// Test storage for SIL global variable declations.
// Test storage for SIL global variable declarations.

sil_global hidden @testGlobal : $Builtin.Int64

Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/address_lowering.sil
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ bb0(%error_exi : @guaranteed $any Error):
}

// Test a chain of projections multiple nodes of which feature an opened
// archetype AND the archetype-definining instruction for the first projection
// archetype AND the archetype-defining instruction for the first projection
// whose type has an opened archetype dominates all blocks but the
// archetype-defining instruction for the SECOND projection does not.
//
Expand Down
4 changes: 2 additions & 2 deletions test/SILOptimizer/address_lowering_phi.sil
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ merge(%sp : @owned $Pair<T>):
// ^^^ ^^^ ^^^
// %s projects out of %s2's storage
// ^^^ ^^^
// %box projects out of %s's strorage
// %box projects out of %s's storage
// ^^^
// %t projects out of %box's storage
// There is no interference (and only one incoming phi.)
Expand Down Expand Up @@ -911,7 +911,7 @@ exit:
// ^^^ ^^^ ^^^
// %s projects out of %s2's storage
// ^^^ ^^^
// %box projects out of %s's strorage
// %box projects out of %s's storage
// ^^^
// %t projects out of %box's storage
// There is interference of the _def_ projection (which can only be detected by
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/capture_propagation.sil
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ bb0(%0 : $Builtin.Int32, %1 : $Builtin.FPIEEE32, %2 : $Builtin.RawPointer, %3 :
// CHECK: %[[CONVERTED:[0-9]+]] = thin_to_thick_function %[[FR]] : $@convention(thin) () -> () to $@callee_owned () -> ()
// CHECK-NOT: partial_apply
// CHECK: apply %[[CALLEE]](%[[CONVERTED]]) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
// CHECL-NOT: partial_apply
// CHECK-NOT: partial_apply
// CHECK: return
sil @test_generic_capture_propagation2_caller : $@convention(thin) () -> () {
%0 = integer_literal $Builtin.Int32, 0
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/devirt_generic_witness_method.sil
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bb0(%0 : $*Item, %1 : $Dictionary<String, Any>, %2 : $@thick Item.Type):
return %6 : $()
}

// Check that it is possible to devirtualize a partial_appy of a generic witness_method.
// Check that it is possible to devirtualize a partial_apply of a generic witness_method.
// Since it is a derived class that invokes an implementation from a base class,
// make sure that the resulting closure is properly converted into a required type.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bb0(%0 : $*Item, %1 : @owned $Dictionary<String, Any>, %2 : $@thick Item.Type):
return %6 : $()
}

// Check that it is possible to devirtualize a partial_appy of a generic witness_method.
// Check that it is possible to devirtualize a partial_apply of a generic witness_method.
// Since it is a derived class that invokes an implementation from a base class,
// make sure that the resulting closure is properly converted into a required type.

Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/dictionary_lookup_with_default.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public struct S {
mutating func doSomething() { }
}

// Check that all partial_applys can be optimized away so that no closure context needs to be allocated.
// Check that all partial_applies can be optimized away so that no closure context needs to be allocated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> partial_apply instructions


// CHECK-LABEL: sil @$s4test6testit_1xySDySiAA1SVGz_SitF :
// CHECK-NOT: partial_apply
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/exclusivity_static_diagnostics.sil
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ bb0(%0 : $*TestDynamic):

// This callee actually accesses different subpaths, but the caller's
// diagnostic should not be able to see that.
sil private [dynamically_replacable] [ossa] @testDynamicLocal : $@convention(thin) (@inout Builtin.Int64, @inout_aliasable TestDynamic) -> () {
sil private [dynamically_replaceable] [ossa] @testDynamicLocal : $@convention(thin) (@inout Builtin.Int64, @inout_aliasable TestDynamic) -> () {
bb0(%0 : $*Builtin.Int64, %1 : $*TestDynamic):
%literal = integer_literal $Builtin.Int64, 1
%access1 = begin_access [modify] [unknown] %0 : $*Builtin.Int64
Expand Down
6 changes: 3 additions & 3 deletions test/SILOptimizer/forwarding_utils.sil
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ entry(%0 : @owned $C, %1 : @owned $C):
return %void : $()
}

// In opaque SIL values mode, handle the tuple_pack_extract forwaded operand.
// In opaque SIL values mode, handle the tuple_pack_extract forwarded operand.
//
// CHECK-LABEL: begin running test 1 of 2 on tuplePackExtractTest: forwarding_def_use_test with: %tuple
// CHECK: USE: operand #0 of end_borrow %1 : $(repeat each T)
Expand Down Expand Up @@ -79,7 +79,7 @@ entry(%tuple_addr : $*(repeat each T)):
return %retval : $()
}

// Handle forwaded guaranteed values.
// Handle forwarded guaranteed values.
//
// CHECK-LABEL: begin running test 1 of 2 on forwardingGuaranteedTest: forwarding_def_use_test with: %0
// CHECK: USE: dead value: %5 = tuple (%3 : $C, %4 : $C)
Expand Down Expand Up @@ -211,7 +211,7 @@ bbExit:
return %void : $()
}

// Chain of owned values. Needs to resolve in a resonable amount of time.
// Chain of owned values. Needs to resolve in a reasonable amount of time.
//
// CHECK-LABEL: begin running test 1 of 2 on forwardingTuplesTest: forwarding_def_use_test with: %0
// CHECK: USE: operand #0 of destroy_value %{{.*}} : $(C, C)
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/function_uses.sil
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sil @public_func : $@convention(thin) () -> ()
// CHECK-NEXT: %1 = dynamic_function_ref @internal_func
// CHECK-NEXT: ]
// CHECK-NEXT: End function internal_func
sil hidden [dynamically_replacable] @internal_func : $@convention(thin) () -> () {
sil hidden [dynamically_replaceable] @internal_func : $@convention(thin) () -> () {
bb0:
%0 = function_ref @public_func : $@convention(thin) () -> ()
%1 = function_ref @public_func : $@convention(thin) () -> ()
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/hoist_destroy_addr.sil
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ entry(%in_addr : $*X):
return %retval : $X
}

// If a begin_apply uses the address, the end_appy and abort_apply should be
// If a begin_apply uses the address, the end_apply and abort_apply should be
// regarded as uses too. Don't hoist over them.
//
// CHECK-LABEL: sil [ossa] @nohoist_over_end_apply_use : {{.*}} {
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/init_accessors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct TestNoInitAndInit {

var pointX: Int {
@storageRestrictions(accesses: x)
init(initalValue) {
init(initialValue) {
}

get { x }
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/let-property-lowering.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class C {
// CHECK: store {{.*}} to [[A]] : $*Int
// CHECK: [[EI:%.*]] = end_init_let_ref %1
// CHECK: bb1:
// CHEKC: ref_element_addr [[EI]] : $C, #C.b
// CHECK: ref_element_addr [[EI]] : $C, #C.b
// CHECK: return [[EI]]
// CHECK: } // end sil function '$s4test1CC1cACSb_tcfc'
init(c: Bool) {
Expand Down
4 changes: 2 additions & 2 deletions test/SILOptimizer/licm.sil
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public protocol P : class {
}

// Check that LICM does not hoist a metatype instruction before
// the open_existential instruction which creates the archtype,
// the open_existential instruction which creates the archetype,
// because this would break the dominance relation between them.
// CHECK-LABEL: sil @dont_hoist_metatype
// CHECK-NOT: metatype
Expand Down Expand Up @@ -1096,7 +1096,7 @@ bb3:
}

// Test multiple stores to disjoint access paths with a single load
// that spans both of them. The load should be split and hosited and
// that spans both of them. The load should be split and hoisted and
// and the stores be sunk.
// testCommonSplitLoad
// CHECK-LABEL: sil shared @testCommonSplitLoad : $@convention(method) (Int64, Builtin.RawPointer) -> (Int64, Int64, Int64) {
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/moveonly_addresschecker.sil
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ sil @end_addr_see_addr : $@convention(thin) (@in M, @in_guaranteed M) -> ()
/// A single instruction, apply @end_addr_see_addr, consumes one field and
/// borrows another.

/// Varify that the consumed value isn't destroyed twice and that the borrowed
/// Verify that the consumed value isn't destroyed twice and that the borrowed
/// value isn't destroyed before it's used.
///
/// Note: This test case doesn't have valid SIL (#M2.s1 is consumed twice), but
Expand Down
8 changes: 4 additions & 4 deletions test/SILOptimizer/opaque_values_Onone.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func doit<T>(_ f: () -> T) -> T {
// CHECK: [[OUTPUT_TUPLE_ADDR:%[^,]+]] = alloc_stack $(Value, Value)
// CHECK: [[DUPLICATE_CLOSURE:%[^,]+]] = function_ref @$s19opaque_values_Onone10duplicate15valuex_xtx_tlFx_xtyXEfU_
// CHECK: [[DUPLICATE_INSTANCE_CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] [[DUPLICATE_CLOSURE]]<Value>([[INSTANCE_ADDR_IN]])
// CHECK: [[DEPENDENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (Value, Value) on [[INSTANCE_ADDR_IN]] : $*Value
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENDENCY]]
// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (Value, Value) on [[INSTANCE_ADDR_IN]] : $*Value
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENCY]]
// CHECK: apply {{%[^,]+}}<(Value, Value)>([[OUTPUT_TUPLE_ADDR]], [[CONVERTED]])
// CHECK-LABEL: } // end sil function 'duplicate1'
// CHECK-LABEL: sil private @$s19opaque_values_Onone10duplicate15valuex_xtx_tlFx_xtyXEfU_ : {{.*}} {
Expand All @@ -93,8 +93,8 @@ func duplicate1<Value>(value: Value) -> (Value, Value) {
// CHECK: [[OUTPUT_TUPLE_ADDR:%[^,]+]] = alloc_stack $(one: Value, two: Value)
// CHECK: [[DUPLICATE_CLOSURE:%[^,]+]] = function_ref @$s19opaque_values_Onone10duplicate25valuex3one_x3twotx_tlFxAD_xAEtyXEfU_
// CHECK: [[DUPLICATE_INSTANCE_CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] [[DUPLICATE_CLOSURE]]<Value>([[INSTANCE_ADDR_IN]])
// CHECK: [[DEPENDENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (one: Value, two: Value) on [[INSTANCE_ADDR_IN]] : $*Value
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENDENCY]]
// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (one: Value, two: Value) on [[INSTANCE_ADDR_IN]] : $*Value
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENCY]]
// CHECK: apply {{%[^,]+}}<(one: Value, two: Value)>([[OUTPUT_TUPLE_ADDR]], [[CONVERTED]])
// CHECK-LABEL: } // end sil function 'duplicate2'
// CHECK-LABEL: sil private @$s19opaque_values_Onone10duplicate25valuex3one_x3twotx_tlFxAD_xAEtyXEfU_ : {{.*}} {
Expand Down
12 changes: 6 additions & 6 deletions test/SILOptimizer/side_effects.sil
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,12 @@ bb0(%0 : @owned $SP):
return %0 : $SP
}

// CHECK-LABEL: sil [ossa] @store_destoys
// CHECK-LABEL: sil [ossa] @store_destroys
// CHECK-NEXT: [%0: read v**, write v**, destroy v**]
// CHECK-NEXT: [%1: write c*.v**, copy c*.v**]
// CHECK-NEXT: [global: write,copy]
// CHECK-NEXT: {{^[^[]}}
sil [ossa] @store_destoys : $@convention(thin) (@inout X, @owned X) -> () {
sil [ossa] @store_destroys : $@convention(thin) (@inout X, @owned X) -> () {
bb0(%0 : $*X, %1 : @owned $X):
store %1 to [assign] %0 : $*X
%2 = tuple ()
Expand Down Expand Up @@ -482,24 +482,24 @@ bb0(%0 : $*X, %1 : @owned $X):
return %2 : $()
}

// CHECK-LABEL: sil [ossa] @copy_destoys
// CHECK-LABEL: sil [ossa] @copy_destroys
// CHECK-NEXT: [%0: read v**, write v**, destroy v**]
// CHECK-NEXT: [%1: read v**, copy v**]
// CHECK-NEXT: [global: write,copy]
// CHECK-NEXT: {{^[^[]}}
sil [ossa] @copy_destoys : $@convention(thin) (@inout X, @in_guaranteed X) -> () {
sil [ossa] @copy_destroys : $@convention(thin) (@inout X, @in_guaranteed X) -> () {
bb0(%0 : $*X, %1 : $*X):
copy_addr %1 to %0 : $*X
%2 = tuple ()
return %2 : $()
}

// CHECK-LABEL: sil [ossa] @copy_doesnt_destoy
// CHECK-LABEL: sil [ossa] @copy_doesnt_destroy
// CHECK-NEXT: [%0: write v**]
// CHECK-NEXT: [%1: read v**, copy v**]
// CHECK-NEXT: [global: ]
// CHECK-NEXT: {{^[^[]}}
sil [ossa] @copy_doesnt_destoy : $@convention(thin) (@in_guaranteed X) -> @out X {
sil [ossa] @copy_doesnt_destroy : $@convention(thin) (@in_guaranteed X) -> @out X {
bb0(%0 : $*X, %1 : $*X):
copy_addr %1 to [init] %0 : $*X
%2 = tuple ()
Expand Down
4 changes: 2 additions & 2 deletions test/SILOptimizer/sil_combine_concrete_existential.sil
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ extension MyObject : SubscriptionViewControllerDelegate { }

sil @callee2 : $@convention(thin) <τ_0_0 where τ_0_0 : SubscriptionViewControllerDelegate> (@in τ_0_0, @thick SubscriptionViewControllerBuilder.Type) -> @owned SubscriptionViewControllerBuilder

// CHECK: sil @test_opend_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed any ResourceKitProtocol, @guaranteed ViewController) -> () {
// CHECK: sil @test_opened_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed any ResourceKitProtocol, @guaranteed ViewController) -> () {
// CHECK: bb0([[ARG:%.*]] : $any ResourceKitProtocol, [[ARG2:%.*]] : $ViewController):
// CHECK: [[T1:%.*]] = metatype $@thick SubscriptionViewControllerBuilder.Type
// CHECK: [[T2:%.*]] = open_existential_ref [[ARG]] : $any ResourceKitProtocol to $@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", any ResourceKitProtocol) Self
Expand All @@ -674,7 +674,7 @@ sil @callee2 : $@convention(thin) <τ_0_0 where τ_0_0 : SubscriptionViewControl
// CHECK: (normal_conformance type="MyObject" protocol="SubscriptionViewControllerDelegate"
// CHECK: apply [[T5]]<@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", any ResourceKitProtocol) Self>([[T6]], [[T1]])

sil @test_opend_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed ResourceKitProtocol, @guaranteed ViewController) -> () {
sil @test_opened_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed ResourceKitProtocol, @guaranteed ViewController) -> () {
bb0(%0 : $ResourceKitProtocol, %1 : $ViewController):
%4 = metatype $@thick SubscriptionViewControllerBuilder.Type
%5 = open_existential_ref %0 : $ResourceKitProtocol to $@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", ResourceKitProtocol) Self
Expand Down
6 changes: 3 additions & 3 deletions test/SILOptimizer/simplify_begin_borrow.sil
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ bb0(%0 : @owned $C):
return %0 : $C
}

// CHECK-LABEL: sil [ossa] @dont_replace_copy_in_differnt_bb :
// CHECK-LABEL: sil [ossa] @dont_replace_copy_in_different_bb :
// CHECK: begin_borrow
// CHECK: } // end sil function 'dont_replace_copy_in_differnt_bb'
sil [ossa] @dont_replace_copy_in_differnt_bb : $@convention(thin) (@owned C) -> @owned C {
// CHECK: } // end sil function 'dont_replace_copy_in_different_bb'
sil [ossa] @dont_replace_copy_in_different_bb : $@convention(thin) (@owned C) -> @owned C {
bb0(%0 : @owned $C):
%1 = begin_borrow %0 : $C
cond_br undef, bb1, bb2
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/simplify_cfg_checkcast.sil
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ bb7:
// Introduce a copy for the new lifetime.
// Simplify down to a single diamond.
//
// TODO: Simplify some of the obvisouly dead copy/destroy/borrows
// TODO: Simplify some of the obviously dead copy/destroy/borrows
// on-the-fly after each simplify-cfg. Possible using CanonicalizeOSSALifetime.
//
// TODO-CHECK-LABEL: sil [ossa] @redundant_checked_cast_br_rauw_guaranteed_to_owned_merge : $@convention(method) (@owned Base) -> () {
Expand Down
4 changes: 2 additions & 2 deletions test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ bb9:
// not know how to allocate for multiple partial applies.
//
// rdar://119768691 (OwnershipModelEliminator triggers assertion when
// lowering certain [on_stack] partial_applys in certain
// lowering certain [on_stack] partial_applies in certain
// circumstances)

sil @test_simple_jump_thread_clone_partial_apply_closure : $@convention(thin) (@inout_aliasable Klass) -> ()
Expand All @@ -194,7 +194,7 @@ sil @test_simple_jump_thread_clone_partial_apply_take_closure : $@convention(thi
// CHECK: partial_apply [callee_guaranteed]
// CHECK-NEXT: mark_dependence
// CHECK-NEXT: begin_borrow [lexical]
// CHECK-NOT: partial_apply [callee_guaranted]
// CHECK-NOT: partial_apply [callee_guaranteed]
// CHECK-NOT: begin_borrow
// CHECK-LABEL: } // end sil function 'test_simple_jump_thread_clone_partial_apply'
sil [ossa] @test_simple_jump_thread_clone_partial_apply : $@convention(thin) (@owned Klass, @inout Klass) -> Builtin.Int1 {
Expand Down
4 changes: 2 additions & 2 deletions test/SILOptimizer/specialize_opaque_type_archetypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ public func testResilientInlinableProperty2() {
}

// CHECK-LABEL: sil @$s1A035testResilientInlinablePropertyCallsbC0yyF : $@convention(thin) () -> () {
// CHECK: [[CONTAINTER:%.*]] = alloc_stack [var_decl] $ResilientContainer2
// CHECK: [[CONTAINER:%.*]] = alloc_stack [var_decl] $ResilientContainer2
// CHECK: [[RES:%.*]] = alloc_stack $Int64
// CHECK: [[FUN:%.*]] = function_ref @$s9External319ResilientContainer2V023inlineablePropertyCallsB10InlineableQrvg
// CHECK: apply [[FUN]]([[RES]], [[CONTAINTER]])
// CHECK: apply [[FUN]]([[RES]], [[CONTAINER]])
public func testResilientInlinablePropertyCallsResilientInlinable() {
let r = ResilientContainer2()
useP(r.inlineablePropertyCallsResilientInlineable.myValue3())
Expand Down
6 changes: 3 additions & 3 deletions test/SILOptimizer/stack_protection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public func overflowWithUnsafeBytes() {
}
}

// CHECK-LABEL: sil [stack_protection] @$s4test31owerflowWithUnsafeBorrowedBytes5valueySi_tF
// CHECK-LABEL: sil [stack_protection] @$s4test31overflowWithUnsafeBorrowedBytes5valueySi_tF
// CHECK-NOT: copy_addr
// CHECK: } // end sil function '$s4test31owerflowWithUnsafeBorrowedBytes5valueySi_tF'
public func owerflowWithUnsafeBorrowedBytes(value: Int) {
// CHECK: } // end sil function '$s4test31overflowWithUnsafeBorrowedBytes5valueySi_tF'
public func overflowWithUnsafeBorrowedBytes(value: Int) {
withUnsafeBytes(of: value) {
potentiallyBadCFunction($0.bindMemory(to: Int.self).baseAddress!)
}
Expand Down