@@ -1673,3 +1673,31 @@ bb0(%0 : @guaranteed $T):
1673
1673
return %6 : $U
1674
1674
}
1675
1675
1676
+ // CHECK-LABEL: sil [ossa] @yield_two : {{.*}} {
1677
+ // CHECK: tuple_element_addr
1678
+ // CHECK: tuple_element_addr
1679
+ // CHECK: [[KEY:%[^,]+]] = tuple_element_addr {{%[^,]+}} : $*(key: Key, value: Value), 0
1680
+ // CHECK: [[VALUE:%[^,]+]] = tuple_element_addr {{%[^,]+}} : $*(key: Key, value: Value), 1
1681
+ // CHECK: yield ([[KEY]] : $*Key, [[VALUE]] : $*Value)
1682
+ // CHECK-LABEL: } // end sil function 'yield_two'
1683
+ sil [ossa] @yield_two : $@yield_once @convention(method) <Key, Value> (@in_guaranteed Key, @in_guaranteed Value) -> (@yields @in_guaranteed Key, @yields @in_guaranteed Value) {
1684
+ bb0(%0 : @guaranteed $Key, %1 : @guaranteed $Value):
1685
+ %7 = copy_value %0 : $Key
1686
+ %8 = copy_value %1 : $Value
1687
+ %9 = tuple $(key: Key, value: Value) (%7, %8)
1688
+ %10 = begin_borrow %9 : $(key: Key, value: Value)
1689
+ %11 = tuple_extract %10 : $(key: Key, value: Value), 0
1690
+ %12 = tuple_extract %10 : $(key: Key, value: Value), 1
1691
+ yield (%11 : $Key, %12 : $Value), resume bb1, unwind bb2
1692
+
1693
+ bb1:
1694
+ end_borrow %10 : $(key: Key, value: Value)
1695
+ destroy_value %9 : $(key: Key, value: Value)
1696
+ %17 = tuple ()
1697
+ return %17 : $()
1698
+
1699
+ bb2:
1700
+ end_borrow %10 : $(key: Key, value: Value)
1701
+ destroy_value %9 : $(key: Key, value: Value)
1702
+ unwind
1703
+ }
0 commit comments