blob: 0db184f72855051f2cd183f9e2a9df85e35d9b0c [file] [log] [blame]
Chris Lattner413100f2006-05-17 03:57:31 +00001; Test various forms of calls.
2
Dan Gohmanfce288f2009-09-09 00:09:15 +00003; RUN: llc < %s -march=ppc32 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00004; RUN: grep {bl } | count 2
Dan Gohmanfce288f2009-09-09 00:09:15 +00005; RUN: llc < %s -march=ppc32 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00006; RUN: grep {bctrl} | count 1
Dan Gohmanfce288f2009-09-09 00:09:15 +00007; RUN: llc < %s -march=ppc32 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00008; RUN: grep {bla } | count 1
Chris Lattner413100f2006-05-17 03:57:31 +00009
Tanya Lattner6f729d62008-03-25 04:26:08 +000010declare void @foo()
Chris Lattner413100f2006-05-17 03:57:31 +000011
Tanya Lattner6f729d62008-03-25 04:26:08 +000012define void @test_direct() {
13 call void @foo( )
14 ret void
Chris Lattner413100f2006-05-17 03:57:31 +000015}
16
Tanya Lattner6f729d62008-03-25 04:26:08 +000017define void @test_extsym(i8* %P) {
18 free i8* %P
19 ret void
Chris Lattner732baf32006-05-17 04:20:13 +000020}
21
Tanya Lattner6f729d62008-03-25 04:26:08 +000022define void @test_indirect(void ()* %fp) {
23 call void %fp( )
24 ret void
Chris Lattner413100f2006-05-17 03:57:31 +000025}
26
Tanya Lattner6f729d62008-03-25 04:26:08 +000027define void @test_abs() {
28 %fp = inttoptr i32 400 to void ()* ; <void ()*> [#uses=1]
29 call void %fp( )
30 ret void
Chris Lattner413100f2006-05-17 03:57:31 +000031}
Tanya Lattner6f729d62008-03-25 04:26:08 +000032