mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[ORC] Add some more basic sanity tests for the LLJIT.
minimal.ll contains a main function that returns zero, and single-function-call.ll contains a main function that calls a foo function that returns zero. These minimal tests can help to rule out some trivial JIT bugs when other tests fail. This commit also renames hello.ll to global-ctors-and-dtors.ll, which better reflects what it is actually testing. llvm-svn: 344863
This commit is contained in:
parent
1ed130bc19
commit
16b394732e
@ -1,5 +1,7 @@
|
||||
; RUN: lli -jit-kind=orc-lazy -orc-lazy-debug=funcs-to-stdout %s | FileCheck %s
|
||||
;
|
||||
; Test that global constructors and destructors are run.
|
||||
;
|
||||
; CHECK: Hello
|
||||
; CHECK: [ {{.*}}main{{.*}} ]
|
||||
; CHECK: Goodbye
|
8
test/ExecutionEngine/OrcLazy/minimal.ll
Normal file
8
test/ExecutionEngine/OrcLazy/minimal.ll
Normal file
@ -0,0 +1,8 @@
|
||||
; RUN: lli -jit-kind=orc-lazy %s
|
||||
;
|
||||
; Basic sanity check: A module with a single no-op main function runs.
|
||||
|
||||
define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
|
||||
entry:
|
||||
ret i32 0
|
||||
}
|
15
test/ExecutionEngine/OrcLazy/single-function-call.ll
Normal file
15
test/ExecutionEngine/OrcLazy/single-function-call.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: lli -jit-kind=orc-lazy %s
|
||||
;
|
||||
; Basic sanity check: We can make a call inside lazily JIT'd code.
|
||||
; Compared to minimal.ll, this demonstrates that we can call through a stub.
|
||||
|
||||
define i32 @foo() {
|
||||
entry:
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
|
||||
entry:
|
||||
%0 = call i32() @foo()
|
||||
ret i32 %0
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user