1 ; Verify that forward declarations from call instructions work even with non-zero AS
2 ; RUN: llvm-as %s -o - | llvm-dis - | FileCheck %s
4 define void @call_named() {
6 %0 = tail call addrspace(40) i32 @named(i16* null)
7 ; CHECK: %0 = tail call addrspace(40) i32 @named(i16* null)
11 define void @call_numbered() {
13 %0 = tail call addrspace(40) i32 @0(i16* null)
14 ; CHECK: %0 = tail call addrspace(40) i32 @0(i16* null)
19 define i32 @invoked() personality i8* null {
21 %0 = invoke addrspace(40) i32 @foo() to label %l1 unwind label %lpad
22 ; CHECK: invoke addrspace(40) i32 @foo()
26 %1 = landingpad { i8*, i32 }
34 declare i32 @foo() addrspace(40)
35 ; CHECK: declare i32 @foo() addrspace(40)
36 declare i32 @named(i16* nocapture) addrspace(40)
37 ; CHECK: declare i32 @named(i16* nocapture) addrspace(40)
38 declare i32 @0(i16*) addrspace(40)
39 ; CHECK: declare i32 @0(i16*) addrspace(40)