view test/CodeGen/PowerPC/calls.ll @ 83:60c9769439b8 LLVM3.7

LLVM 3.7
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Wed, 18 Feb 2015 14:55:36 +0900
parents 95c75e76d11b
children 1172e4bd9c6f
line wrap: on
line source

; Test various forms of calls.

; RUN: llc < %s -march=ppc32 | \
; RUN:   grep "bl " | count 1
; RUN: llc < %s -march=ppc32 | \
; RUN:   grep "bctrl" | count 1
; RUN: llc < %s -march=ppc32 | \
; RUN:   grep "bla " | count 1

declare void @foo()

define void @test_direct() {
        call void @foo( )
        ret void
}

define void @test_indirect(void ()* %fp) {
        call void %fp( )
        ret void
}

define void @test_abs() {
        %fp = inttoptr i32 400 to void ()*              ; <void ()*> [#uses=1]
        call void %fp( )
        ret void
}