diff options
Diffstat (limited to 'test/ExecutionEngine')
35 files changed, 69 insertions, 34 deletions
diff --git a/test/ExecutionEngine/2002-12-16-ArgTest.ll b/test/ExecutionEngine/2002-12-16-ArgTest.ll index a51e3a1..4551969 100644 --- a/test/ExecutionEngine/2002-12-16-ArgTest.ll +++ b/test/ExecutionEngine/2002-12-16-ArgTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null @.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1] diff --git a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll b/test/ExecutionEngine/2003-01-04-ArgumentBug.ll index 89106b5..5d37e96 100644 --- a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll +++ b/test/ExecutionEngine/2003-01-04-ArgumentBug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @foo(i32 %X, i32 %Y, double %A) { diff --git a/test/ExecutionEngine/2003-01-04-LoopTest.ll b/test/ExecutionEngine/2003-01-04-LoopTest.ll index 07cb1d3..653cf79 100644 --- a/test/ExecutionEngine/2003-01-04-LoopTest.ll +++ b/test/ExecutionEngine/2003-01-04-LoopTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o %t.bc -f +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/2003-01-04-PhiTest.ll b/test/ExecutionEngine/2003-01-04-PhiTest.ll index 649ed0b..b5c9d81 100644 --- a/test/ExecutionEngine/2003-01-04-PhiTest.ll +++ b/test/ExecutionEngine/2003-01-04-PhiTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/2003-01-09-SARTest.ll b/test/ExecutionEngine/2003-01-09-SARTest.ll index a9df7f2..8147897 100644 --- a/test/ExecutionEngine/2003-01-09-SARTest.ll +++ b/test/ExecutionEngine/2003-01-09-SARTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; We were accidentally inverting the signedness of right shifts. Whoops. diff --git a/test/ExecutionEngine/2003-01-10-FUCOM.ll b/test/ExecutionEngine/2003-01-10-FUCOM.ll index 30f9330..d996fa5 100644 --- a/test/ExecutionEngine/2003-01-10-FUCOM.ll +++ b/test/ExecutionEngine/2003-01-10-FUCOM.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/2003-01-15-AlignmentTest.ll b/test/ExecutionEngine/2003-01-15-AlignmentTest.ll index 7529eb4..a55d74d 100644 --- a/test/ExecutionEngine/2003-01-15-AlignmentTest.ll +++ b/test/ExecutionEngine/2003-01-15-AlignmentTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @bar(i8* %X) { diff --git a/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll b/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll index 7b48f57..5a13b21 100644 --- a/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll +++ b/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null target datalayout = "e-p:32:32" diff --git a/test/ExecutionEngine/2003-06-04-bzip2-bug.ll b/test/ExecutionEngine/2003-06-04-bzip2-bug.ll index 6dee717..6e2da70 100644 --- a/test/ExecutionEngine/2003-06-04-bzip2-bug.ll +++ b/test/ExecutionEngine/2003-06-04-bzip2-bug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; Testcase distilled from 256.bzip2. diff --git a/test/ExecutionEngine/2003-06-05-PHIBug.ll b/test/ExecutionEngine/2003-06-05-PHIBug.ll index 2cd9c1b..50b48da 100644 --- a/test/ExecutionEngine/2003-06-05-PHIBug.ll +++ b/test/ExecutionEngine/2003-06-05-PHIBug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; Testcase distilled from 256.bzip2. diff --git a/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll b/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll index 8a96377..6c90b33 100644 --- a/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll +++ b/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; This testcase failed to work because two variable sized allocas confused the diff --git a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll b/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll index 23efbee..3a4a4e4 100644 --- a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll +++ b/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; diff --git a/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll b/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll index 25a24f5..b165a1c 100644 --- a/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll +++ b/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; This testcase exposes a bug in the local register allocator where it runs out diff --git a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll b/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll index e289e10..aa9d7e7 100644 --- a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll +++ b/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null @A = global i32 0 ; <i32*> [#uses=1] diff --git a/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll b/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll index 02b65b1..e7e434f 100644 --- a/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll +++ b/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli -force-interpreter=true %t.bc | grep 1 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" diff --git a/test/ExecutionEngine/hello.ll b/test/ExecutionEngine/hello.ll index 3cd29f6..fad36ed 100644 --- a/test/ExecutionEngine/hello.ll +++ b/test/ExecutionEngine/hello.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null @.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1] diff --git a/test/ExecutionEngine/hello2.ll b/test/ExecutionEngine/hello2.ll index a6a6194..7ca0d88 100644 --- a/test/ExecutionEngine/hello2.ll +++ b/test/ExecutionEngine/hello2.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null @X = global i32 7 ; <i32*> [#uses=0] diff --git a/test/ExecutionEngine/simplesttest.ll b/test/ExecutionEngine/simplesttest.ll index fa69533..5d9cf76 100644 --- a/test/ExecutionEngine/simplesttest.ll +++ b/test/ExecutionEngine/simplesttest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/simpletest.ll b/test/ExecutionEngine/simpletest.ll index 0ed5b44..53fb79c 100644 --- a/test/ExecutionEngine/simpletest.ll +++ b/test/ExecutionEngine/simpletest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @bar() { diff --git a/test/ExecutionEngine/stubs.ll b/test/ExecutionEngine/stubs.ll new file mode 100644 index 0000000..525d135 --- /dev/null +++ b/test/ExecutionEngine/stubs.ll @@ -0,0 +1,35 @@ +; RUN: llvm-as < %s | lli -disable-lazy-compilation=false + +define i32 @main() nounwind { +entry: + call void @lazily_compiled_address_is_consistent() + ret i32 0 +} + +; Test PR3043: @test should have the same address before and after +; it's JIT-compiled. +@funcPtr = common global i1 ()* null, align 4 +@lcaic_failure = internal constant [46 x i8] c"@lazily_compiled_address_is_consistent failed\00" + +define void @lazily_compiled_address_is_consistent() nounwind { +entry: + store i1 ()* @test, i1 ()** @funcPtr + %pass = tail call i1 @test() ; <i32> [#uses=1] + br i1 %pass, label %pass_block, label %fail_block +pass_block: + ret void +fail_block: + call i32 @puts(i8* getelementptr([46 x i8]* @lcaic_failure, i32 0, i32 0)) + call void @exit(i32 1) + unreachable +} + +define i1 @test() nounwind { +entry: + %tmp = load i1 ()** @funcPtr + %eq = icmp eq i1 ()* %tmp, @test + ret i1 %eq +} + +declare i32 @puts(i8*) noreturn +declare void @exit(i32) noreturn diff --git a/test/ExecutionEngine/test-arith.ll b/test/ExecutionEngine/test-arith.ll index d99e30f..8c51e6b 100644 --- a/test/ExecutionEngine/test-arith.ll +++ b/test/ExecutionEngine/test-arith.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/test-branch.ll b/test/ExecutionEngine/test-branch.ll index d7251f8..dd8db54 100644 --- a/test/ExecutionEngine/test-branch.ll +++ b/test/ExecutionEngine/test-branch.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; test unconditional branch diff --git a/test/ExecutionEngine/test-call.ll b/test/ExecutionEngine/test-call.ll index a1b3cd6..4464ebd 100644 --- a/test/ExecutionEngine/test-call.ll +++ b/test/ExecutionEngine/test-call.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null declare void @exit(i32) diff --git a/test/ExecutionEngine/test-cast.ll b/test/ExecutionEngine/test-cast.ll index 1458f6c..82d4949 100644 --- a/test/ExecutionEngine/test-cast.ll +++ b/test/ExecutionEngine/test-cast.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @foo() { diff --git a/test/ExecutionEngine/test-constantexpr.ll b/test/ExecutionEngine/test-constantexpr.ll index 3623cf4..cd5c635 100644 --- a/test/ExecutionEngine/test-constantexpr.ll +++ b/test/ExecutionEngine/test-constantexpr.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; This tests to make sure that we can evaluate weird constant expressions diff --git a/test/ExecutionEngine/test-fp.ll b/test/ExecutionEngine/test-fp.ll index 2e8ecd5..4ebcf6f 100644 --- a/test/ExecutionEngine/test-fp.ll +++ b/test/ExecutionEngine/test-fp.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define double @test(double* %DP, double %Arg) { diff --git a/test/ExecutionEngine/test-loadstore.ll b/test/ExecutionEngine/test-loadstore.ll index 298ea96..ba0f0ba 100644 --- a/test/ExecutionEngine/test-loadstore.ll +++ b/test/ExecutionEngine/test-loadstore.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) { diff --git a/test/ExecutionEngine/test-logical.ll b/test/ExecutionEngine/test-logical.ll index f30c334..e560e52 100644 --- a/test/ExecutionEngine/test-logical.ll +++ b/test/ExecutionEngine/test-logical.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/test-loop.ll b/test/ExecutionEngine/test-loop.ll index 78fc314..7cd69e2 100644 --- a/test/ExecutionEngine/test-loop.ll +++ b/test/ExecutionEngine/test-loop.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/test-malloc.ll b/test/ExecutionEngine/test-malloc.ll index bc857ed..8f79d97 100644 --- a/test/ExecutionEngine/test-malloc.ll +++ b/test/ExecutionEngine/test-malloc.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/test-phi.ll b/test/ExecutionEngine/test-phi.ll index 69d1b08..f1aaefa 100644 --- a/test/ExecutionEngine/test-phi.ll +++ b/test/ExecutionEngine/test-phi.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; test phi node diff --git a/test/ExecutionEngine/test-ret.ll b/test/ExecutionEngine/test-ret.ll index e684fd5..eae91f5 100644 --- a/test/ExecutionEngine/test-ret.ll +++ b/test/ExecutionEngine/test-ret.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null ; test return instructions diff --git a/test/ExecutionEngine/test-setcond-fp.ll b/test/ExecutionEngine/test-setcond-fp.ll index b917693..4264e2c 100644 --- a/test/ExecutionEngine/test-setcond-fp.ll +++ b/test/ExecutionEngine/test-setcond-fp.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null diff --git a/test/ExecutionEngine/test-setcond-int.ll b/test/ExecutionEngine/test-setcond-int.ll index f80c247..772f4fa 100644 --- a/test/ExecutionEngine/test-setcond-int.ll +++ b/test/ExecutionEngine/test-setcond-int.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { diff --git a/test/ExecutionEngine/test-shift.ll b/test/ExecutionEngine/test-shift.ll index 330de0b..2791b85 100644 --- a/test/ExecutionEngine/test-shift.ll +++ b/test/ExecutionEngine/test-shift.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -f -o %t.bc +; RUN: llvm-as %s -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { |