aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionEngine/OrcLazy/trivial_retval_1.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/ExecutionEngine/OrcLazy/trivial_retval_1.ll')
-rw-r--r--test/ExecutionEngine/OrcLazy/trivial_retval_1.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/ExecutionEngine/OrcLazy/trivial_retval_1.ll b/test/ExecutionEngine/OrcLazy/trivial_retval_1.ll
new file mode 100644
index 0000000..701f22c
--- /dev/null
+++ b/test/ExecutionEngine/OrcLazy/trivial_retval_1.ll
@@ -0,0 +1,26 @@
+; RUN: sh -c 'lli -jit-kind=orc-lazy %s; echo $?' | FileCheck %s
+; CHECK: {{^30$}}
+define i32 @baz() {
+entry:
+ ret i32 2
+}
+
+define i32 @bar() {
+entry:
+ %call = call i32 @baz()
+ %mul = mul nsw i32 3, %call
+ ret i32 %mul
+}
+
+define i32 @foo() {
+entry:
+ %call = call i32 @bar()
+ %mul = mul nsw i32 5, %call
+ ret i32 %mul
+}
+
+define i32 @main(i32 %argc, i8** %argv) {
+entry:
+ %call = call i32 @foo()
+ ret i32 %call
+}