1 ; RUN: not opt -S %s -verify 2>&1 | FileCheck %s
3 ; CHECK: Indirect label missing from arglist.
5 ; The %4 in the indirect label list is not found in the blockaddresses in the
7 callbr void asm sideeffect "${0:l} {1:l}", "X,X"(i8* blockaddress(@foo, %3), i8* blockaddress(@foo, %2))
8 to label %1 [label %4, label %2]
19 ; CHECK-NOT: Indirect label missing from arglist.
21 ; %4 and %2 are both in the indirect label list and the arg list (good).
22 callbr void asm sideeffect "${0:l} ${1:l}", "X,X"(i8* blockaddress(@bar, %4), i8* blockaddress(@bar, %2))
23 to label %1 [label %4, label %2]
34 ; CHECK-NOT: Indirect label missing from arglist.
36 ; note %2 blockaddress. Such a case is possible when passing the address of
37 ; a label as an input to the inline asm (both address of label and asm goto
38 ; use blockaddress constants; we're testing that the indirect label list from
39 ; the asm goto is in the arg list to the asm).
40 callbr void asm sideeffect "${0:l} ${1:l} ${2:l}", "X,X,X"(i8* blockaddress(@baz, %4), i8* blockaddress(@baz, %2), i8* blockaddress(@baz, %3))
41 to label %1 [label %3, label %4]