summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/calls.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-17 03:57:31 +0000
committerChris Lattner <sabre@nondot.org>2006-05-17 03:57:31 +0000
commit413100fcb5222e873db596026c3f18790a1909ab (patch)
tree8fc998f55b040fd6b5c449c2bf5cb7b07db6cded /test/CodeGen/PowerPC/calls.ll
parent4e64b5b711848574670ce27a558d8cf2d227eacd (diff)
downloadllvm-413100fcb5222e873db596026c3f18790a1909ab.tar.gz
llvm-413100fcb5222e873db596026c3f18790a1909ab.tar.bz2
llvm-413100fcb5222e873db596026c3f18790a1909ab.tar.xz
new test for various forms of calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/calls.ll')
-rw-r--r--test/CodeGen/PowerPC/calls.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/calls.ll b/test/CodeGen/PowerPC/calls.ll
new file mode 100644
index 0000000000..fa0567fc9c
--- /dev/null
+++ b/test/CodeGen/PowerPC/calls.ll
@@ -0,0 +1,23 @@
+; Test various forms of calls.
+
+; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bl ' | wc -l | grep 1 &&
+; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bctrl' | wc -l | grep 1 &&
+; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bla ' | wc -l | grep 1
+
+declare void %foo()
+
+void %test_direct() {
+ call void %foo()
+ ret void
+}
+
+void %test_indirect(void()* %fp) {
+ call void %fp()
+ ret void
+}
+
+void %test_abs() {
+ %fp = cast int 400 to void()*
+ call void %fp()
+ ret void
+}