Debian Codegraph @

llvm/test/CodeGen/PowerPC/test_call_aix.ll

raw
1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -stop-after=machine-cp < %s | \
2 ; RUN: FileCheck --check-prefix=32BIT %s
3
4 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -stop-after=machine-cp < %s | \
5 ; RUN: FileCheck --check-prefix=64BIT %s
6
7 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
8 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s
9
10 declare void @foo(...)
11
12 define void @test_call() {
13 entry:
14 ; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
15 ; 32BIT: BL_NOP <mcsymbol .foo[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r2, implicit-def $r1
16 ; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
17
18 ; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
19 ; 64BIT: BL8_NOP <mcsymbol .foo[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x2, implicit-def $r1
20 ; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
21
22 ; CHECK-LABEL: test_call
23 ; CHECK: bl .foo
24 ; CHECK-NEXT: nop
25
26 call void @foo()
27 ret void
28 }
29
30 define hidden void @foo_local() {
31 entry:
32 ret void
33 }
34
35 define void @test_local_call() {
36 entry:
37 ; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
38 ; 32BIT: BL <mcsymbol .foo_local>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r2, implicit-def $r1
39 ; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
40
41 ; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
42 ; 64BIT: BL8 <mcsymbol .foo_local>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x2, implicit-def $r1
43 ; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
44
45 ; CHECK-LABEL: test_local_call
46 ; CHECK: bl .foo_local
47 ; CHECK-NOT: nop
48
49 call void @foo_local()
50 ret void
51 }