We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 839221a + cc886e1 commit 6e89dbeCopy full SHA for 6e89dbe
test/SILOptimizer/mem2reg.sil
@@ -327,3 +327,18 @@ bb0(%0 : $AnyObject):
327
return %7 : $()
328
}
329
330
+// Test cases where there are dead address instructions.
331
+// CHECK-LABEL: sil @dead_use
332
+// CHECK-NOT: alloc_stack
333
+sil @dead_use : $@convention(thin) () -> () {
334
+ %0 = alloc_stack $Int64
335
+ %1 = struct_element_addr %0 : $*Int64, #Int64._value
336
+ dealloc_stack %0 : $*Int64
337
+ %2 = alloc_stack $(Int64, Int64)
338
+ %3 = tuple_element_addr %2 : $*(Int64, Int64), 0
339
+ dealloc_stack %2 : $*(Int64, Int64)
340
+ // CHECK: [[VAL:%.*]] = tuple ()
341
+ %4 = tuple ()
342
+ // CHECK: return [[VAL]]
343
+ return %4 : $()
344
+}
0 commit comments