File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -1779,8 +1779,6 @@ bool swift::visitForwardedGuaranteedOperands(
1779
1779
|| isa<OwnershipForwardingMultipleValueInstruction>(inst)
1780
1780
|| isa<MoveOnlyWrapperToCopyableValueInst>(inst)
1781
1781
|| isa<CopyableToMoveOnlyWrapperValueInst>(inst)) {
1782
- assert (inst->getNumRealOperands () == 1
1783
- && " forwarding instructions must have a single real operand" );
1784
1782
assert (!isa<SingleValueInstruction>(inst)
1785
1783
|| !BorrowedValue (cast<SingleValueInstruction>(inst))
1786
1784
&& " forwarded operand cannot begin a borrow scope" );
Original file line number Diff line number Diff line change @@ -222,3 +222,29 @@ exit:
222
222
%retval = tuple ()
223
223
return %retval : $()
224
224
}
225
+
226
+ // CHECK-LABEL: begin running test 1 of 1 on introducer_dependence: find-borrow-introducers with: @trace[0]
227
+ // CHECK: Introducers:
228
+ // CHECK: %0 = argument of bb0 : $C
229
+ // CHECK-LABEL: end running test 1 of 1 on introducer_dependence: find-borrow-introducers with: @trace[0]
230
+ sil [ossa] @introducer_dependence : $@convention(thin) (@guaranteed C, @guaranteed Builtin.NativeObject) -> () {
231
+ entry(%0 : @guaranteed $C, %1 : @guaranteed $Builtin.NativeObject):
232
+ test_specification "find-borrow-introducers @trace[0]"
233
+ %dependent = mark_dependence %0 : $C on %1 : $Builtin.NativeObject
234
+ debug_value [trace] %dependent : $C
235
+ %retval = tuple ()
236
+ return %retval : $()
237
+ }
238
+
239
+ // CHECK-LABEL: begin running test 1 of 1 on introducer_bridge: find-borrow-introducers with: @trace[0]
240
+ // CHECK: Introducers:
241
+ // CHECK: %0 = argument of bb0 : $C
242
+ // CHECK-LABEL: end running test 1 of 1 on introducer_bridge: find-borrow-introducers with: @trace[0]
243
+ sil [ossa] @introducer_bridge : $@convention(thin) (@guaranteed C, Builtin.Word) -> () {
244
+ entry(%0 : @guaranteed $C, %1 : $Builtin.Word):
245
+ test_specification "find-borrow-introducers @trace[0]"
246
+ %bridge = ref_to_bridge_object %0 : $C, %1 : $Builtin.Word
247
+ debug_value [trace] %bridge : $Builtin.BridgeObject
248
+ %retval = tuple ()
249
+ return %retval : $()
250
+ }
You can’t perform that action at this time.
0 commit comments