From bb8cef51dfe7bb59109786a0ca46ad165c39aa38 Mon Sep 17 00:00:00 2001 From: Danil Malyshev Date: Thu, 17 May 2012 21:07:47 +0000 Subject: - Added ExecutionEngine/MCJIT tests - Added HOST_ARCH to Makefile.config.in The HOST_ARCH will be used by MCJIT tests filter, because MCJIT supported only x86 and ARM architectures now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157015 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll | 37 +++++++ .../MCJIT/2003-01-04-ArgumentBug.ll | 13 +++ test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll | 20 ++++ test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll | 12 +++ test/ExecutionEngine/MCJIT/2003-01-09-SARTest.ll | 11 +++ test/ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll | 10 ++ .../MCJIT/2003-01-15-AlignmentTest.ll | 17 ++++ .../MCJIT/2003-05-06-LivenessClobber.ll | 19 ++++ .../MCJIT/2003-05-07-ArgumentTest.ll | 11 +++ .../MCJIT/2003-05-11-PHIRegAllocBug.ll | 15 +++ test/ExecutionEngine/MCJIT/2003-06-04-bzip2-bug.ll | 19 ++++ test/ExecutionEngine/MCJIT/2003-06-05-PHIBug.ll | 17 ++++ .../MCJIT/2003-08-15-AllocaAssertion.ll | 11 +++ .../MCJIT/2003-08-21-EnvironmentTest.ll | 21 ++++ .../MCJIT/2003-08-23-RegisterAllocatePhysReg.ll | 34 +++++++ ...-10-18-PHINode-ConstantExpr-CondCode-Failure.ll | 23 +++++ .../MCJIT/2005-12-02-TailCallBug.ll | 22 +++++ .../MCJIT/2007-12-10-APIntLoadStore.ll | 19 ++++ .../MCJIT/2008-06-05-APInt-OverAShr.ll | 59 +++++++++++ .../ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll | 8 ++ test/ExecutionEngine/MCJIT/fpbitcast.ll | 20 ++++ test/ExecutionEngine/MCJIT/hello.ll | 11 +++ test/ExecutionEngine/MCJIT/hello2.ll | 17 ++++ test/ExecutionEngine/MCJIT/lit.local.cfg | 20 ++++ test/ExecutionEngine/MCJIT/simplesttest.ll | 6 ++ test/ExecutionEngine/MCJIT/simpletest.ll | 11 +++ test/ExecutionEngine/MCJIT/stubs.ll | 35 +++++++ test/ExecutionEngine/MCJIT/test-arith.ll | 34 +++++++ test/ExecutionEngine/MCJIT/test-branch.ll | 12 +++ .../MCJIT/test-call-no-external-funcs.ll | 14 +++ test/ExecutionEngine/MCJIT/test-call.ll | 21 ++++ test/ExecutionEngine/MCJIT/test-cast.ll | 109 +++++++++++++++++++++ test/ExecutionEngine/MCJIT/test-common-symbols.ll | 88 +++++++++++++++++ test/ExecutionEngine/MCJIT/test-constantexpr.ll | 12 +++ .../MCJIT/test-fp-no-external-funcs.ll | 21 ++++ test/ExecutionEngine/MCJIT/test-fp.ll | 23 +++++ .../MCJIT/test-global-init-nonzero.ll | 34 +++++++ test/ExecutionEngine/MCJIT/test-global.ll | 34 +++++++ test/ExecutionEngine/MCJIT/test-loadstore.ll | 31 ++++++ test/ExecutionEngine/MCJIT/test-local.ll | 34 +++++++ test/ExecutionEngine/MCJIT/test-logical.ll | 18 ++++ test/ExecutionEngine/MCJIT/test-loop.ll | 14 +++ test/ExecutionEngine/MCJIT/test-phi.ll | 34 +++++++ test/ExecutionEngine/MCJIT/test-ret.ll | 46 +++++++++ test/ExecutionEngine/MCJIT/test-return.ll | 8 ++ test/ExecutionEngine/MCJIT/test-setcond-fp.ll | 24 +++++ test/ExecutionEngine/MCJIT/test-setcond-int.ll | 69 +++++++++++++ test/ExecutionEngine/MCJIT/test-shift.ll | 32 ++++++ 48 files changed, 1230 insertions(+) create mode 100644 test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-09-SARTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-05-11-PHIRegAllocBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-06-04-bzip2-bug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-06-05-PHIBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll create mode 100644 test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll create mode 100644 test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll create mode 100644 test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll create mode 100644 test/ExecutionEngine/MCJIT/fpbitcast.ll create mode 100644 test/ExecutionEngine/MCJIT/hello.ll create mode 100644 test/ExecutionEngine/MCJIT/hello2.ll create mode 100644 test/ExecutionEngine/MCJIT/lit.local.cfg create mode 100644 test/ExecutionEngine/MCJIT/simplesttest.ll create mode 100644 test/ExecutionEngine/MCJIT/simpletest.ll create mode 100644 test/ExecutionEngine/MCJIT/stubs.ll create mode 100644 test/ExecutionEngine/MCJIT/test-arith.ll create mode 100644 test/ExecutionEngine/MCJIT/test-branch.ll create mode 100644 test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll create mode 100644 test/ExecutionEngine/MCJIT/test-call.ll create mode 100644 test/ExecutionEngine/MCJIT/test-cast.ll create mode 100644 test/ExecutionEngine/MCJIT/test-common-symbols.ll create mode 100644 test/ExecutionEngine/MCJIT/test-constantexpr.ll create mode 100644 test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll create mode 100644 test/ExecutionEngine/MCJIT/test-fp.ll create mode 100644 test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll create mode 100644 test/ExecutionEngine/MCJIT/test-global.ll create mode 100644 test/ExecutionEngine/MCJIT/test-loadstore.ll create mode 100644 test/ExecutionEngine/MCJIT/test-local.ll create mode 100644 test/ExecutionEngine/MCJIT/test-logical.ll create mode 100644 test/ExecutionEngine/MCJIT/test-loop.ll create mode 100644 test/ExecutionEngine/MCJIT/test-phi.ll create mode 100644 test/ExecutionEngine/MCJIT/test-ret.ll create mode 100644 test/ExecutionEngine/MCJIT/test-return.ll create mode 100644 test/ExecutionEngine/MCJIT/test-setcond-fp.ll create mode 100644 test/ExecutionEngine/MCJIT/test-setcond-int.ll create mode 100644 test/ExecutionEngine/MCJIT/test-shift.ll (limited to 'test/ExecutionEngine') diff --git a/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll b/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll new file mode 100644 index 0000000..46273d3 --- /dev/null +++ b/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll @@ -0,0 +1,37 @@ +; RUN: %lli -use-mcjit %s > /dev/null + +@.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1] + +declare i32 @puts(i8*) + +define void @getoptions(i32* %argc) { +bb0: + ret void +} + +declare i32 @printf(i8*, ...) + +define i32 @main(i32 %argc, i8** %argv) { +bb0: + call i32 (i8*, ...)* @printf( i8* getelementptr ([10 x i8]* @.LC0, i64 0, i64 0), i32 %argc ) ; :0 [#uses=0] + %cast224 = bitcast i8** %argv to i8* ; [#uses=1] + %local = alloca i8* ; [#uses=3] + store i8* %cast224, i8** %local + %cond226 = icmp sle i32 %argc, 0 ; [#uses=1] + br i1 %cond226, label %bb3, label %bb2 +bb2: ; preds = %bb2, %bb0 + %cann-indvar = phi i32 [ 0, %bb0 ], [ %add1-indvar, %bb2 ] ; [#uses=2] + %add1-indvar = add i32 %cann-indvar, 1 ; [#uses=2] + %cann-indvar-idxcast = sext i32 %cann-indvar to i64 ; [#uses=1] + %CT = bitcast i8** %local to i8*** ; [#uses=1] + %reg115 = load i8*** %CT ; [#uses=1] + %cast235 = getelementptr i8** %reg115, i64 %cann-indvar-idxcast ; [#uses=1] + %reg117 = load i8** %cast235 ; [#uses=1] + %reg236 = call i32 @puts( i8* %reg117 ) ; [#uses=0] + %cond239 = icmp slt i32 %add1-indvar, %argc ; [#uses=1] + br i1 %cond239, label %bb2, label %bb3 +bb3: ; preds = %bb2, %bb0 + %cast243 = bitcast i8** %local to i32* ; [#uses=1] + call void @getoptions( i32* %cast243 ) + ret i32 0 +} diff --git a/test/ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll b/test/ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll new file mode 100644 index 0000000..88bfbb3 --- /dev/null +++ b/test/ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll @@ -0,0 +1,13 @@ +; RUN: %lli -use-mcjit %s > /dev/null + +define i32 @foo(i32 %X, i32 %Y, double %A) { + %cond212 = fcmp une double %A, 1.000000e+00 ; [#uses=1] + %cast110 = zext i1 %cond212 to i32 ; [#uses=1] + ret i32 %cast110 +} + +define i32 @main() { + %reg212 = call i32 @foo( i32 0, i32 1, double 1.000000e+00 ) ; [#uses=1] + ret i32 %reg212 +} + diff --git a/test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll b/test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll new file mode 100644 index 0000000..d5f860d --- /dev/null +++ b/test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll @@ -0,0 +1,20 @@ +; RUN: %lli -use-mcjit %s > /dev/null + +define i32 @main() { + call i32 @mylog( i32 4 ) ; :1 [#uses=0] + ret i32 0 +} + +define internal i32 @mylog(i32 %num) { +bb0: + br label %bb2 +bb2: ; preds = %bb2, %bb0 + %reg112 = phi i32 [ 10, %bb2 ], [ 1, %bb0 ] ; [#uses=1] + %cann-indvar = phi i32 [ %cann-indvar, %bb2 ], [ 0, %bb0 ] ; [#uses=1] + %reg114 = add i32 %reg112, 1 ; [#uses=2] + %cond222 = icmp slt i32 %reg114, %num ; [#uses=1] + br i1 %cond222, label %bb2, label %bb3 +bb3: ; preds = %bb2 + ret i32 %reg114 +} + diff --git a/test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll b/test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll new file mode 100644 index 0000000..721f2e8 --- /dev/null +++ b/test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll @@ -0,0 +1,12 @@ +; RUN: %lli -use-mcjit %s > /dev/null + +define i32 @main() { +;