1 ; RUN: opt %s -passes=deadargelim -S | FileCheck %s
4 @block_addr = global ptr blockaddress(@varargs_func, %l1)
5 ; CHECK: @block_addr = global ptr blockaddress(@varargs_func, %l1)
8 ; This function is referenced by a "blockaddress" constant but it is
9 ; not address-taken, so the pass should be able to remove its unused
12 define internal i32 @varargs_func(ptr %addr, ...) {
13 indirectbr ptr %addr, [ label %l1, label %l2 ]
19 ; CHECK: define internal i32 @varargs_func(ptr %addr) {
21 define i32 @caller(ptr %addr) {
22 %r = call i32 (ptr, ...) @varargs_func(ptr %addr)
25 ; CHECK: %r = call i32 @varargs_func(ptr %addr)