@@ -321,11 +321,24 @@ bb0(%0 : @owned $(Builtin.NativeObject, Builtin.Int32), %1 : @owned $TestArray2)
321
321
322
322
// CHECK-LABEL: sil [canonical] @test_simplify_instruction : $@convention(thin) (@owned Builtin.NativeObject, Builtin.Int32) -> @owned Builtin.NativeObject {
323
323
// CHECK: bb0([[ARG:%.*]] : $Builtin.NativeObject,
324
- // CHECK-NEXT : return [[ARG]]
324
+ // CHECK: return [[ARG]]
325
325
// CHECK: } // end sil function 'test_simplify_instruction'
326
326
sil [canonical] [ossa] @test_simplify_instruction : $@convention(thin) (@owned Builtin.NativeObject, Builtin.Int32) -> @owned Builtin.NativeObject {
327
327
bb0(%0 : @owned $Builtin.NativeObject, %1 : $Builtin.Int32):
328
328
%2 = tuple(%0 : $Builtin.NativeObject, %1 : $Builtin.Int32)
329
329
(%3, %4) = destructure_tuple %2 : $(Builtin.NativeObject, Builtin.Int32)
330
330
return %3 : $Builtin.NativeObject
331
331
}
332
+
333
+ // Just make sure that we do not crash on this function.
334
+ //
335
+ // CHECK-LABEL: sil @do_not_crash_due_to_debug_value_use : $@convention(thin) (Builtin.Int32, Builtin.Int32) -> () {
336
+ // CHECK: } // end sil function 'do_not_crash_due_to_debug_value_use'
337
+ sil [ossa] @do_not_crash_due_to_debug_value_use : $@convention(thin) (Builtin.Int32, Builtin.Int32) -> () {
338
+ bb0(%0a : $Builtin.Int32, %0b : $Builtin.Int32):
339
+ %0 = tuple(%0a : $Builtin.Int32, %0b : $Builtin.Int32)
340
+ (%1, %2) = destructure_tuple %0 : $(Builtin.Int32, Builtin.Int32)
341
+ debug_value %0 : $(Builtin.Int32, Builtin.Int32), let, name "myName2"
342
+ %9999 = tuple()
343
+ return %9999 : $()
344
+ }
0 commit comments