summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine/test-call.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/ExecutionEngine/test-call.ll')
-rw-r--r--llvm/test/ExecutionEngine/test-call.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/ExecutionEngine/test-call.ll b/llvm/test/ExecutionEngine/test-call.ll
new file mode 100644
index 00000000000..23e4f14a540
--- /dev/null
+++ b/llvm/test/ExecutionEngine/test-call.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: lli %t.bc > /dev/null
+
+
+declare void %exit(int)
+
+int %test(sbyte %C, short %S) {
+ %X = cast short %S to ubyte
+ %Y = cast ubyte %X to int
+ ret int %Y
+}
+
+void %FP(void(int) * %F) {
+ %X = call int %test(sbyte 123, short 1024)
+ call void %F(int %X)
+ ret void
+}
+
+int %main() {
+ call void %FP(void(int)* %exit)
+ ret int 1
+}
OpenPOWER on IntegriCloud