Skip to content

Commit 1017b6d

Browse files
committed
Fixup tests
1 parent 3b040d0 commit 1017b6d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

test/IRGen/big_types.sil

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,17 @@ unwind:
8080
// CHECK-LABEL: sil @use_yield_big : $@convention(thin) () -> () {
8181
// CHECK: bb0:
8282
// CHECK-NEXT: [[TEMP:%.*]] = alloc_stack $BigStruct
83+
// CHECK-NEXT: [[TEMP2:%.*]] = alloc_stack $BigStruct
8384
// CHECK-NEXT: // function_ref
8485
// CHECK-NEXT: [[CORO:%.*]] = function_ref @test_yield_big : $@yield_once @convention(thin) () -> @yields @in_guaranteed BigStruct
8586
// CHECK-NEXT: ([[ADDR:%.*]], [[TOKEN:%.*]]) = begin_apply [[CORO]]()
86-
// TODO: this isn't very efficient
87-
// CHECK-NEXT: [[T0:%.*]] = load [[ADDR]] : $*BigStruct
88-
// CHECK-NEXT: store [[T0]] to [[TEMP]] : $*BigStruct
87+
// CHECK-NEXT: copy_addr [take] [[ADDR]] to [init] [[TEMP]] : $*BigStruct
88+
// CHECK-NEXT: copy_addr [take] [[TEMP]] to [init] [[TEMP2]] : $*BigStruct
8989
// CHECK-NEXT: // function_ref
9090
// CHECK-NEXT: [[USE:%.*]] = function_ref @use_big_struct : $@convention(thin) (@in_guaranteed BigStruct) -> ()
91-
// CHECK-NEXT: apply [[USE]]([[TEMP]])
91+
// CHECK-NEXT: apply [[USE]]([[TEMP2]])
9292
// CHECK-NEXT: [[RET:%.*]] = end_apply [[TOKEN]] as $()
93+
// CHECK-NEXT: dealloc_stack [[TEMP2]] : $*BigStruct
9394
// CHECK-NEXT: dealloc_stack [[TEMP]] : $*BigStruct
9495
// CHECK-NEXT: return [[RET]] : $()
9596
sil @use_yield_big : $@convention(thin) () -> () {

test/IRGen/loadable_by_address_address_assignment.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ public struct Container2 {
6464

6565
// CHECK: sil @$s1t10LargeThingVACycfC : $@convention(method) (@thin LargeThing.Type) -> @out LargeThing {
6666
// CHECK: bb0(%0 : $*LargeThing, %1 : $@thin LargeThing.Type):
67-
// CHECK: [[T0:%.*]] = alloc_stack $LargeThing
68-
// CHECK: [[T2:%.*]] = struct_element_addr [[T0]] : $*LargeThing, #LargeThing.s0
67+
// CHECK: [[T0:%.*]] = alloc_stack $LargeThing
68+
// CHECK: [[T1:%.*]] = alloc_stack [var_decl] $LargeThing
69+
// CHECK: [[T2:%.*]] = struct_element_addr [[T1]] : $*LargeThing, #LargeThing.s0
6970
// CHECK: store {{.*}} to [[T2]] : $*String
71+
// CHECK: copy_addr [take] [[T1]] to [init] [[T0]] : $*LargeThing
7072
// CHECK: copy_addr [take] [[T0]] to [init] %0 : $*LargeThing
7173
// CHECK: } // end sil function '$s1t10LargeThingVACycfC'
7274

0 commit comments

Comments
 (0)