| 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 |
|
| 10 |
declare void @foo() |
| 11 |
|
| 12 |
define void @test_direct() { |
| 13 |
call void @foo( ) |
| 14 |
ret void |
| 15 |
} |
| 16 |
|
| 17 |
define void @test_indirect(ptr %fp) { |
| 18 |
call void %fp( ) |
| 19 |
ret void |
| 20 |
} |
| 21 |
|
| 22 |
define void @test_abs() { |
| 23 |
%fp = inttoptr i32 400 to ptr ; <ptr> [#uses=1] |
| 24 |
call void %fp( ) |
| 25 |
ret void |
| 26 |
} |
| 27 |
|