@@ -1626,3 +1626,31 @@ bb0(%0 : @guaranteed $T):
1626
1626
return %6 : $U
1627
1627
}
1628
1628
1629
+ // CHECK-LABEL: sil [ossa] @yield_two : {{.*}} {
1630
+ // CHECK: tuple_element_addr
1631
+ // CHECK: tuple_element_addr
1632
+ // CHECK: [[KEY:%[^,]+]] = tuple_element_addr {{%[^,]+}} : $*(key: Key, value: Value), 0
1633
+ // CHECK: [[VALUE:%[^,]+]] = tuple_element_addr {{%[^,]+}} : $*(key: Key, value: Value), 1
1634
+ // CHECK: yield ([[KEY]] : $*Key, [[VALUE]] : $*Value)
1635
+ // CHECK-LABEL: } // end sil function 'yield_two'
1636
+ sil [ossa] @yield_two : $@yield_once @convention(method) <Key, Value> (@in_guaranteed Key, @in_guaranteed Value) -> (@yields @in_guaranteed Key, @yields @in_guaranteed Value) {
1637
+ bb0(%0 : @guaranteed $Key, %1 : @guaranteed $Value):
1638
+ %7 = copy_value %0 : $Key
1639
+ %8 = copy_value %1 : $Value
1640
+ %9 = tuple $(key: Key, value: Value) (%7, %8)
1641
+ %10 = begin_borrow %9 : $(key: Key, value: Value)
1642
+ %11 = tuple_extract %10 : $(key: Key, value: Value), 0
1643
+ %12 = tuple_extract %10 : $(key: Key, value: Value), 1
1644
+ yield (%11 : $Key, %12 : $Value), resume bb1, unwind bb2
1645
+
1646
+ bb1:
1647
+ end_borrow %10 : $(key: Key, value: Value)
1648
+ destroy_value %9 : $(key: Key, value: Value)
1649
+ %17 = tuple ()
1650
+ return %17 : $()
1651
+
1652
+ bb2:
1653
+ end_borrow %10 : $(key: Key, value: Value)
1654
+ destroy_value %9 : $(key: Key, value: Value)
1655
+ unwind
1656
+ }
0 commit comments