mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
66e55d58ea
This ensures that we're building and testing the CompileOnDemand layer, at least in a basic way. Currently x86-64 only, and with limited to no library calls enabled (depending on host platform). Patches welcome. ;) To enable access to the lazy JIT, this patch replaces the '-use-orcmcjit' lli option with a new option: '-jit-kind={ mcjit | orc-mcjit | orc-lazy }'. All regression tests are updated to use the new option, and one trivial test of the new lazy JIT is added. llvm-svn: 233182
24 lines
608 B
LLVM
24 lines
608 B
LLVM
; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
|
|
|
|
@A = global i32 0 ; <i32*> [#uses=1]
|
|
|
|
define i32 @main() {
|
|
%Ret = call i32 @test( i1 true, i32 0 ) ; <i32> [#uses=1]
|
|
ret i32 %Ret
|
|
}
|
|
|
|
define i32 @test(i1 %c, i32 %A) {
|
|
br i1 %c, label %Taken1, label %NotTaken
|
|
Cont: ; preds = %Taken1, %NotTaken
|
|
%V = phi i32 [ 0, %NotTaken ], [ sub (i32 ptrtoint (i32* @A to i32), i32 1234), %Taken1 ] ; <i32> [#uses=0]
|
|
ret i32 0
|
|
NotTaken: ; preds = %0
|
|
br label %Cont
|
|
Taken1: ; preds = %0
|
|
%B = icmp eq i32 %A, 0 ; <i1> [#uses=1]
|
|
br i1 %B, label %Cont, label %ExitError
|
|
ExitError: ; preds = %Taken1
|
|
ret i32 12
|
|
}
|
|
|