xref: /llvm-project/llvm/test/CodeGen/PowerPC/calls.ll (revision 427fb35192f1f7bb694a5910b05abc5925a798b2)
1; Test various forms of calls.
2
3; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
4; RUN:   grep "bl " | count 1
5; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
6; RUN:   grep "bctrl" | count 1
7; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
8; RUN:   grep "bla " | count 1
9
10declare void @foo()
11
12define void @test_direct() {
13        call void @foo( )
14        ret void
15}
16
17define void @test_indirect(ptr %fp) {
18        call void %fp( )
19        ret void
20}
21
22define void @test_abs() {
23        %fp = inttoptr i32 400 to ptr              ; <ptr> [#uses=1]
24        call void %fp( )
25        ret void
26}
27
28