Tighten the conditions under which we do PRE, remove some unneeded code, and correct...
[oota-llvm.git] / test / CodeGen / PowerPC / calls.ll
1 ; Test various forms of calls.
2
3 ; RUN: llvm-as < %s | llc -march=ppc32 | \
4 ; RUN:   grep {bl } | count 2
5 ; RUN: llvm-as < %s | llc -march=ppc32 | \
6 ; RUN:   grep {bctrl} | count 1
7 ; RUN: llvm-as < %s | llc -march=ppc32 | \
8 ; RUN:   grep {bla } | count 1
9
10 declare void @foo()
11
12 define void @test_direct() {
13         call void @foo( )
14         ret void
15 }
16
17 define void @test_extsym(i8* %P) {
18         free i8* %P
19         ret void
20 }
21
22 define void @test_indirect(void ()* %fp) {
23         call void %fp( )
24         ret void
25 }
26
27 define void @test_abs() {
28         %fp = inttoptr i32 400 to void ()*              ; <void ()*> [#uses=1]
29         call void %fp( )
30         ret void
31 }
32