blob: 29bcb2081188dada8339c1c0d422e464deed88a3 [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 | \
Chris Lattner26b00002011-06-17 03:14:27 +00004; RUN: grep {bl } | count 1
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_indirect(void ()* %fp) {
18 call void %fp( )
19 ret void
Chris Lattner413100f2006-05-17 03:57:31 +000020}
21
Tanya Lattner6f729d62008-03-25 04:26:08 +000022define void @test_abs() {
23 %fp = inttoptr i32 400 to void ()* ; <void ()*> [#uses=1]
24 call void %fp( )
25 ret void
Chris Lattner413100f2006-05-17 03:57:31 +000026}
Tanya Lattner6f729d62008-03-25 04:26:08 +000027