1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | \
2 ; RUN: FileCheck --check-prefixes=CHECK,32BIT %s
4 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | \
5 ; RUN: FileCheck --check-prefixes=CHECK,64BIT %s
16 %1 = call i32 bitcast (i32 (...)* @extern_foo to i32 ()*)()
17 %2 = call i32 @static_foo()
18 %3 = add nsw i32 %0, %1
19 %4 = add nsw i32 %3, %2
23 declare i32 @extern_foo(...)
25 define internal i32 @static_foo() {
32 ; CHECK: .csect foo[DS]
35 ; 32BIT-NEXT: .long TOC[TC0]
38 ; 64BIT-NEXT: .llong TOC[TC0]
39 ; 64BIT-NEXT: .llong 0
40 ; CHECK-NEXT: .csect .text[PR]
45 ; CHECK: .csect main[DS]
48 ; 32BIT-NEXT: .long TOC[TC0]
51 ; 64BIT-NEXT: .llong TOC[TC0]
52 ; 64BIT-NEXT: .llong 0
53 ; CHECK-NEXT: .csect .text[PR]
56 ; CHECK: bl .extern_foo
57 ; CHECK: bl .static_foo
59 ; CHECK: .lglobl .static_foo
60 ; CHECK: .csect static_foo[DS]
61 ; CHECK-NEXT: static_foo:
62 ; 32BIT: .long .static_foo
63 ; 32BIT-NEXT: .long TOC[TC0]
65 ; 64BIT: .llong .static_foo
66 ; 64BIT-NEXT: .llong TOC[TC0]
67 ; 64BIT-NEXT: .llong 0
68 ; CHECK-NEXT: .csect .text[PR]
69 ; CHECK-LABEL: .static_foo:
71 ; CHECK-NOT: .csect extern_foo