aboutsummaryrefslogtreecommitdiff
path: root/test/ExecutionEngine
diff options
context:
space:
mode:
Diffstat (limited to 'test/ExecutionEngine')
-rw-r--r--test/ExecutionEngine/2003-05-07-ArgumentTest.ll11
-rw-r--r--test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll14
-rw-r--r--test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll6
-rw-r--r--test/ExecutionEngine/MCJIT/fpbitcast.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/hello-sm-pic.ll12
-rw-r--r--test/ExecutionEngine/MCJIT/hello.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/hello2.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/pr13727.ll32
-rw-r--r--test/ExecutionEngine/MCJIT/remote/stubs-remote.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll32
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/stubs-sm-pic.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/stubs.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/test-common-symbols.ll32
-rw-r--r--test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/test-fp.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/test-global-ctors.ll2
-rw-r--r--test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/test-global.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/test-loadstore.ll10
-rw-r--r--test/ExecutionEngine/MCJIT/test-local.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll8
-rw-r--r--test/ExecutionEngine/MCJIT/test-ptr-reloc.ll8
-rw-r--r--test/ExecutionEngine/OrcLazy/anonymous_globals.ll18
-rw-r--r--test/ExecutionEngine/OrcLazy/hello.ll35
-rw-r--r--test/ExecutionEngine/OrcLazy/lit.local.cfg2
-rw-r--r--test/ExecutionEngine/OrcLazy/private_linkage.ll12
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2002-12-16-ArgTest.ll (renamed from test/ExecutionEngine/2002-12-16-ArgTest.ll)10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-01-04-ArgumentBug.ll (renamed from test/ExecutionEngine/2003-01-04-ArgumentBug.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-01-04-LoopTest.ll (renamed from test/ExecutionEngine/2003-01-04-LoopTest.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-01-04-PhiTest.ll (renamed from test/ExecutionEngine/2003-01-04-PhiTest.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-01-09-SARTest.ll (renamed from test/ExecutionEngine/2003-01-09-SARTest.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-01-10-FUCOM.ll (renamed from test/ExecutionEngine/2003-01-10-FUCOM.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-01-15-AlignmentTest.ll (renamed from test/ExecutionEngine/2003-01-15-AlignmentTest.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-05-06-LivenessClobber.ll (renamed from test/ExecutionEngine/2003-05-06-LivenessClobber.ll)4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-05-07-ArgumentTest.ll11
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-05-11-PHIRegAllocBug.ll13
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-06-04-bzip2-bug.ll17
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-06-05-PHIBug.ll15
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-08-15-AllocaAssertion.ll (renamed from test/ExecutionEngine/2003-08-15-AllocaAssertion.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-08-21-EnvironmentTest.ll (renamed from test/ExecutionEngine/2003-08-21-EnvironmentTest.ll)4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-08-23-RegisterAllocatePhysReg.ll (renamed from test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll (renamed from test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2005-12-02-TailCallBug.ll (renamed from test/ExecutionEngine/2005-12-02-TailCallBug.ll)3
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2007-12-10-APIntLoadStore.ll (renamed from test/ExecutionEngine/2007-12-10-APIntLoadStore.ll)6
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2008-06-05-APInt-OverAShr.ll (renamed from test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll)16
-rw-r--r--test/ExecutionEngine/OrcMCJIT/2013-04-04-RelocAddend.ll25
-rw-r--r--test/ExecutionEngine/OrcMCJIT/Inputs/cross-module-b.ll7
-rw-r--r--test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-b.ll7
-rw-r--r--test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-c.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll30
-rw-r--r--test/ExecutionEngine/OrcMCJIT/cross-module-a.ll13
-rw-r--r--test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll14
-rw-r--r--test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll32
-rw-r--r--test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll32
-rw-r--r--test/ExecutionEngine/OrcMCJIT/eh.ll32
-rw-r--r--test/ExecutionEngine/OrcMCJIT/fpbitcast.ll (renamed from test/ExecutionEngine/fpbitcast.ll)6
-rw-r--r--test/ExecutionEngine/OrcMCJIT/hello.ll11
-rw-r--r--test/ExecutionEngine/OrcMCJIT/hello2.ll (renamed from test/ExecutionEngine/hello2.ll)4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/lit.local.cfg26
-rw-r--r--test/ExecutionEngine/OrcMCJIT/load-object-a.ll24
-rw-r--r--test/ExecutionEngine/OrcMCJIT/multi-module-a.ll9
-rw-r--r--test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll35
-rw-r--r--test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/non-extern-addend.ll21
-rw-r--r--test/ExecutionEngine/OrcMCJIT/pr13727.ll88
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/Inputs/cross-module-b.ll7
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-b.ll7
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-c.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/cross-module-a.ll12
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/cross-module-sm-pic-a.ll14
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/lit.local.cfg8
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/multi-module-a.ll9
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/multi-module-sm-pic-a.ll10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/simpletest-remote.ll10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/stubs-remote.ll37
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/stubs-sm-pic.ll37
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-common-symbols-remote.ll88
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-data-align-remote.ll15
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-fp-no-external-funcs-remote.ll20
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-remote.ll34
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll35
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-remote.ll15
-rw-r--r--test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll17
-rw-r--r--test/ExecutionEngine/OrcMCJIT/simplesttest.ll6
-rw-r--r--test/ExecutionEngine/OrcMCJIT/simpletest.ll (renamed from test/ExecutionEngine/simpletest.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll36
-rw-r--r--test/ExecutionEngine/OrcMCJIT/stubs.ll (renamed from test/ExecutionEngine/stubs.ll)6
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-arith.ll (renamed from test/ExecutionEngine/test-arith.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-branch.ll (renamed from test/ExecutionEngine/test-branch.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-call-no-external-funcs.ll (renamed from test/ExecutionEngine/test-call-no-external-funcs.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-call.ll (renamed from test/ExecutionEngine/test-call.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-cast.ll (renamed from test/ExecutionEngine/test-cast.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-common-symbols-alignment.ll32
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-common-symbols.ll (renamed from test/ExecutionEngine/test-common-symbols.ll)34
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-constantexpr.ll (renamed from test/ExecutionEngine/test-constantexpr.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-data-align.ll15
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-fp-no-external-funcs.ll (renamed from test/ExecutionEngine/test-fp-no-external-funcs.ll)4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-fp.ll (renamed from test/ExecutionEngine/test-fp.ll)4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll22
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll35
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero.ll (renamed from test/ExecutionEngine/test-global-init-nonzero.ll)10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-global.ll (renamed from test/ExecutionEngine/test-global.ll)10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-loadstore.ll (renamed from test/ExecutionEngine/test-loadstore.ll)12
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-local.ll (renamed from test/ExecutionEngine/test-local.ll)10
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-logical.ll (renamed from test/ExecutionEngine/test-logical.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-loop.ll (renamed from test/ExecutionEngine/test-loop.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-phi.ll (renamed from test/ExecutionEngine/test-phi.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll17
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-ptr-reloc.ll16
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-ret.ll (renamed from test/ExecutionEngine/test-ret.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-return.ll (renamed from test/ExecutionEngine/test-return.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-setcond-fp.ll (renamed from test/ExecutionEngine/test-setcond-fp.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-setcond-int.ll (renamed from test/ExecutionEngine/test-setcond-int.ll)2
-rw-r--r--test/ExecutionEngine/OrcMCJIT/test-shift.ll (renamed from test/ExecutionEngine/test-shift.ll)2
-rw-r--r--test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_6431
-rw-r--r--test/ExecutionEngine/RuntimeDyld/X86/ELF_x64-64_PIC_relocations.s31
-rw-r--r--test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll2
-rw-r--r--test/ExecutionEngine/fma3-jit.ll4
-rw-r--r--test/ExecutionEngine/frem.ll6
-rw-r--r--test/ExecutionEngine/hello.ll11
-rw-r--r--test/ExecutionEngine/simplesttest.ll6
-rw-r--r--test/ExecutionEngine/test-interp-vec-loadstore.ll42
136 files changed, 1419 insertions, 299 deletions
diff --git a/test/ExecutionEngine/2003-05-07-ArgumentTest.ll b/test/ExecutionEngine/2003-05-07-ArgumentTest.ll
deleted file mode 100644
index 42db5fe93fcd..000000000000
--- a/test/ExecutionEngine/2003-05-07-ArgumentTest.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: %lli %s test
-
-declare i32 @puts(i8*)
-
-define i32 @main(i32 %argc.1, i8** %argv.1) {
- %tmp.5 = getelementptr i8** %argv.1, i64 1 ; <i8**> [#uses=1]
- %tmp.6 = load i8** %tmp.5 ; <i8*> [#uses=1]
- %tmp.0 = call i32 @puts( i8* %tmp.6 ) ; <i32> [#uses=0]
- ret i32 0
-}
-
diff --git a/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll b/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
index eb2fe8c04832..7b1cb16def0e 100644
--- a/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
+++ b/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
@@ -13,7 +13,7 @@ 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 ) ; <i32>:0 [#uses=0]
+ call i32 (i8*, ...) @printf( i8* getelementptr ([10 x i8], [10 x i8]* @.LC0, i64 0, i64 0), i32 %argc ) ; <i32>:0 [#uses=0]
%cast224 = bitcast i8** %argv to i8* ; <i8*> [#uses=1]
%local = alloca i8* ; <i8**> [#uses=3]
store i8* %cast224, i8** %local
@@ -24,9 +24,9 @@ bb2: ; preds = %bb2, %bb0
%add1-indvar = add i32 %cann-indvar, 1 ; <i32> [#uses=2]
%cann-indvar-idxcast = sext i32 %cann-indvar to i64 ; <i64> [#uses=1]
%CT = bitcast i8** %local to i8*** ; <i8***> [#uses=1]
- %reg115 = load i8*** %CT ; <i8**> [#uses=1]
- %cast235 = getelementptr i8** %reg115, i64 %cann-indvar-idxcast ; <i8**> [#uses=1]
- %reg117 = load i8** %cast235 ; <i8*> [#uses=1]
+ %reg115 = load i8**, i8*** %CT ; <i8**> [#uses=1]
+ %cast235 = getelementptr i8*, i8** %reg115, i64 %cann-indvar-idxcast ; <i8**> [#uses=1]
+ %reg117 = load i8*, i8** %cast235 ; <i8*> [#uses=1]
%reg236 = call i32 @puts( i8* %reg117 ) ; <i32> [#uses=0]
%cond239 = icmp slt i32 %add1-indvar, %argc ; <i1> [#uses=1]
br i1 %cond239, label %bb2, label %bb3
diff --git a/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll b/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
index 576ef7cf6380..d714bf7367bc 100644
--- a/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
+++ b/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
@@ -5,7 +5,7 @@
@test = global i64 0 ; <i64*> [#uses=1]
define internal i64 @test.upgrd.1() {
- %tmp.0 = load i64* @test ; <i64> [#uses=1]
+ %tmp.0 = load i64, i64* @test ; <i64> [#uses=1]
%tmp.1 = add i64 %tmp.0, 1 ; <i64> [#uses=1]
ret i64 %tmp.1
}
diff --git a/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll b/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
index 42db5fe93fcd..0538201326f9 100644
--- a/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
+++ b/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
@@ -3,8 +3,8 @@
declare i32 @puts(i8*)
define i32 @main(i32 %argc.1, i8** %argv.1) {
- %tmp.5 = getelementptr i8** %argv.1, i64 1 ; <i8**> [#uses=1]
- %tmp.6 = load i8** %tmp.5 ; <i8*> [#uses=1]
+ %tmp.5 = getelementptr i8*, i8** %argv.1, i64 1 ; <i8**> [#uses=1]
+ %tmp.6 = load i8*, i8** %tmp.5 ; <i8*> [#uses=1]
%tmp.0 = call i32 @puts( i8* %tmp.6 ) ; <i32> [#uses=0]
ret i32 0
}
diff --git a/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll b/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
index 63303fcff7c6..e2c52b495d9f 100644
--- a/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
+++ b/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
@@ -12,7 +12,7 @@
declare i32 @strlen(i8*)
define i32 @main(i32 %argc.1, i8** %argv.1, i8** %envp.1) {
- %tmp.2 = load i8** %envp.1 ; <i8*> [#uses=1]
+ %tmp.2 = load i8*, i8** %envp.1 ; <i8*> [#uses=1]
%tmp.3 = call i32 @strlen( i8* %tmp.2 ) ; <i32> [#uses=1]
%T = icmp eq i32 %tmp.3, 0 ; <i1> [#uses=1]
%R = zext i1 %T to i32 ; <i32> [#uses=1]
diff --git a/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll b/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
index 418361163fcf..d557f573dae5 100644
--- a/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
+++ b/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
@@ -9,11 +9,11 @@ entry:
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i75 999, i75* %x, align 16
store i32 0, i32* %tmp, align 4
- %tmp1 = load i32* %tmp, align 4 ; <i32> [#uses=1]
+ %tmp1 = load i32, i32* %tmp, align 4 ; <i32> [#uses=1]
store i32 %tmp1, i32* %retval, align 4
br label %return
return: ; preds = %entry
- %retval2 = load i32* %retval ; <i32> [#uses=1]
+ %retval2 = load i32, i32* %retval ; <i32> [#uses=1]
ret i32 %retval2
}
diff --git a/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll b/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
index 349db69e4c63..c0a5d3b4c863 100644
--- a/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
+++ b/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
@@ -12,15 +12,15 @@ entry:
%tmp = alloca i65 ; <i65*> [#uses=2]
%"alloca point" = bitcast i65 0 to i65 ; <i65> [#uses=0]
store i65 %x, i65* %x_addr
- %tmp1 = load i65* %x_addr, align 4 ; <i65> [#uses=1]
+ %tmp1 = load i65, i65* %x_addr, align 4 ; <i65> [#uses=1]
%tmp2 = ashr i65 %tmp1, 65 ; <i65> [#uses=1]
store i65 %tmp2, i65* %tmp, align 4
- %tmp3 = load i65* %tmp, align 4 ; <i65> [#uses=1]
+ %tmp3 = load i65, i65* %tmp, align 4 ; <i65> [#uses=1]
store i65 %tmp3, i65* %retval, align 4
br label %return
return: ; preds = %entry
- %retval4 = load i65* %retval ; <i65> [#uses=1]
+ %retval4 = load i65, i65* %retval ; <i65> [#uses=1]
ret i65 %retval4
}
@@ -46,14 +46,14 @@ cond_false: ; preds = %entry
br label %cond_next
cond_next: ; preds = %cond_false, %cond_true
- %tmp5 = getelementptr [10 x i8]* @.str, i32 0, i32 0 ; <i8*> [#uses=1]
- %tmp6 = load i32* %iftmp.0, align 4 ; <i32> [#uses=1]
- %tmp7 = call i32 (i8*, ...)* @printf( i8* noalias %tmp5, i32 %tmp6 ) nounwind ; <i32> [#uses=0]
+ %tmp5 = getelementptr [10 x i8], [10 x i8]* @.str, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp6 = load i32, i32* %iftmp.0, align 4 ; <i32> [#uses=1]
+ %tmp7 = call i32 (i8*, ...) @printf( i8* noalias %tmp5, i32 %tmp6 ) nounwind ; <i32> [#uses=0]
br label %return
return: ; preds = %cond_next
store i32 0, i32* %retval, align 4
- %retval8 = load i32* %retval ; <i32> [#uses=1]
+ %retval8 = load i32, i32* %retval ; <i32> [#uses=1]
ret i32 %retval8
}
diff --git a/test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll b/test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll
deleted file mode 100644
index 8bf03de321ba..000000000000
--- a/test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: %lli -force-interpreter=true %s > /dev/null
-
-define i32 @main() {
- %a = add i32 0, undef
- %b = fadd float 0.0, undef
- %c = fadd double 0.0, undef
- ret i32 0
-}
diff --git a/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll b/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
index d9ff347b0786..631cb2f67af0 100644
--- a/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
+++ b/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
@@ -14,12 +14,12 @@
;
@test = global [2 x i32] [i32 -1, i32 0], align 4
-@p = global i32* getelementptr inbounds ([2 x i32]* @test, i64 0, i64 1), align 8
+@p = global i32* getelementptr inbounds ([2 x i32], [2 x i32]* @test, i64 0, i64 1), align 8
define i32 @main() {
entry:
- %0 = load i32** @p, align 8
- %1 = load i32* %0, align 4
+ %0 = load i32*, i32** @p, align 8
+ %1 = load i32, i32* %0, align 4
ret i32 %1
}
diff --git a/test/ExecutionEngine/MCJIT/fpbitcast.ll b/test/ExecutionEngine/MCJIT/fpbitcast.ll
index e6d06f83db49..670c142c0ffe 100644
--- a/test/ExecutionEngine/MCJIT/fpbitcast.ll
+++ b/test/ExecutionEngine/MCJIT/fpbitcast.ll
@@ -12,8 +12,8 @@ entry:
define i32 @main()
{
%res = call i32 @test(double 3.14)
- %ptr = getelementptr [4 x i8]* @format, i32 0, i32 0
- call i32 (i8*,...)* @printf(i8* %ptr, i32 %res)
+ %ptr = getelementptr [4 x i8], [4 x i8]* @format, i32 0, i32 0
+ call i32 (i8*,...) @printf(i8* %ptr, i32 %res)
ret i32 0
}
diff --git a/test/ExecutionEngine/MCJIT/hello-sm-pic.ll b/test/ExecutionEngine/MCJIT/hello-sm-pic.ll
deleted file mode 100644
index 7db60f7aeeb4..000000000000
--- a/test/ExecutionEngine/MCJIT/hello-sm-pic.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: %lli -relocation-model=pic -code-model=small %s > /dev/null
-; XFAIL: mips, i686, i386, darwin, aarch64, arm
-
-@.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1]
-
-declare i32 @puts(i8*)
-
-define i32 @main() {
- %reg210 = call i32 @puts( i8* getelementptr ([12 x i8]* @.LC0, i64 0, i64 0) ) ; <i32> [#uses=0]
- ret i32 0
-}
-
diff --git a/test/ExecutionEngine/MCJIT/hello.ll b/test/ExecutionEngine/MCJIT/hello.ll
index 47e36a589563..516f57a81cd1 100644
--- a/test/ExecutionEngine/MCJIT/hello.ll
+++ b/test/ExecutionEngine/MCJIT/hello.ll
@@ -5,7 +5,7 @@
declare i32 @puts(i8*)
define i32 @main() {
- %reg210 = call i32 @puts( i8* getelementptr ([12 x i8]* @.LC0, i64 0, i64 0) ) ; <i32> [#uses=0]
+ %reg210 = call i32 @puts( i8* getelementptr ([12 x i8], [12 x i8]* @.LC0, i64 0, i64 0) ) ; <i32> [#uses=0]
ret i32 0
}
diff --git a/test/ExecutionEngine/MCJIT/hello2.ll b/test/ExecutionEngine/MCJIT/hello2.ll
index 13b25884fee7..31a1a6e7a74e 100644
--- a/test/ExecutionEngine/MCJIT/hello2.ll
+++ b/test/ExecutionEngine/MCJIT/hello2.ll
@@ -6,7 +6,7 @@
declare void @printf([13 x i8]*, ...)
define void @bar() {
- call void ([13 x i8]*, ...)* @printf( [13 x i8]* @msg )
+ call void ([13 x i8]*, ...) @printf( [13 x i8]* @msg )
ret void
}
diff --git a/test/ExecutionEngine/MCJIT/pr13727.ll b/test/ExecutionEngine/MCJIT/pr13727.ll
index 6f5ae3999bcd..79dd9b4ccc0e 100644
--- a/test/ExecutionEngine/MCJIT/pr13727.ll
+++ b/test/ExecutionEngine/MCJIT/pr13727.ll
@@ -31,20 +31,20 @@ entry:
%retval = alloca i32, align 4
%i = alloca i32, align 4
store i32 0, i32* %retval
- %0 = load i32* @zero_int, align 4
+ %0 = load i32, i32* @zero_int, align 4
%add = add nsw i32 %0, 5
%idxprom = sext i32 %add to i64
- %arrayidx = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
store i32 40, i32* %arrayidx, align 4
- %1 = load double* @zero_double, align 8
+ %1 = load double, double* @zero_double, align 8
%cmp = fcmp olt double %1, 1.100000e+00
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
- %2 = load i32* @zero_int, align 4
+ %2 = load i32, i32* @zero_int, align 4
%add1 = add nsw i32 %2, 2
%idxprom2 = sext i32 %add1 to i64
- %arrayidx3 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
+ %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
store i32 70, i32* %arrayidx3, align 4
br label %if.end
@@ -53,35 +53,35 @@ if.end: ; preds = %if.then, %entry
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
- %3 = load i32* %i, align 4
+ %3 = load i32, i32* %i, align 4
%cmp4 = icmp slt i32 %3, 10
br i1 %cmp4, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %4 = load i32* %i, align 4
+ %4 = load i32, i32* %i, align 4
%sub = sub nsw i32 %4, 1
%idxprom5 = sext i32 %sub to i64
- %arrayidx6 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
- %5 = load i32* %arrayidx6, align 4
- %6 = load i32* %i, align 4
+ %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
+ %5 = load i32, i32* %arrayidx6, align 4
+ %6 = load i32, i32* %i, align 4
%idxprom7 = sext i32 %6 to i64
- %arrayidx8 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
- %7 = load i32* %arrayidx8, align 4
+ %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
+ %7 = load i32, i32* %arrayidx8, align 4
%add9 = add nsw i32 %5, %7
- %8 = load i32* %i, align 4
+ %8 = load i32, i32* %i, align 4
%idxprom10 = sext i32 %8 to i64
- %arrayidx11 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
+ %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
store i32 %add9, i32* %arrayidx11, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %9 = load i32* %i, align 4
+ %9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %10 = load i32* getelementptr inbounds ([10 x i32]* @zero_arr, i32 0, i64 9), align 4
+ %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
%cmp12 = icmp eq i32 %10, 110
%cond = select i1 %cmp12, i32 0, i32 -1
ret i32 %cond
diff --git a/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll b/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
index da4ddc6943c2..a834ac5c9850 100644
--- a/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
@@ -21,14 +21,14 @@ entry:
pass_block:
ret void
fail_block:
- call i32 @puts(i8* getelementptr([46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
call void @exit(i32 1)
unreachable
}
define i1 @test() nounwind {
entry:
- %tmp = load i1 ()** @funcPtr
+ %tmp = load i1 ()*, i1 ()** @funcPtr
%eq = icmp eq i1 ()* %tmp, @test
ret i1 %eq
}
diff --git a/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll b/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
index f6a16078dfae..62e89cad332d 100644
--- a/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
@@ -21,14 +21,14 @@ entry:
pass_block:
ret void
fail_block:
- call i32 @puts(i8* getelementptr([46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
call void @exit(i32 1)
unreachable
}
define i1 @test() nounwind {
entry:
- %tmp = load i1 ()** @funcPtr
+ %tmp = load i1 ()*, i1 ()** @funcPtr
%eq = icmp eq i1 ()* %tmp, @test
ret i1 %eq
}
diff --git a/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
index 0f58710603d0..fb7750adf497 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
@@ -31,20 +31,20 @@ entry:
%retval = alloca i32, align 4
%i = alloca i32, align 4
store i32 0, i32* %retval
- %0 = load i32* @zero_int, align 4
+ %0 = load i32, i32* @zero_int, align 4
%add = add nsw i32 %0, 5
%idxprom = sext i32 %add to i64
- %arrayidx = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
store i32 40, i32* %arrayidx, align 4
- %1 = load double* @zero_double, align 8
+ %1 = load double, double* @zero_double, align 8
%cmp = fcmp olt double %1, 1.000000e+00
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
- %2 = load i32* @zero_int, align 4
+ %2 = load i32, i32* @zero_int, align 4
%add1 = add nsw i32 %2, 2
%idxprom2 = sext i32 %add1 to i64
- %arrayidx3 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
+ %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
store i32 70, i32* %arrayidx3, align 4
br label %if.end
@@ -53,35 +53,35 @@ if.end: ; preds = %if.then, %entry
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
- %3 = load i32* %i, align 4
+ %3 = load i32, i32* %i, align 4
%cmp4 = icmp slt i32 %3, 10
br i1 %cmp4, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %4 = load i32* %i, align 4
+ %4 = load i32, i32* %i, align 4
%sub = sub nsw i32 %4, 1
%idxprom5 = sext i32 %sub to i64
- %arrayidx6 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
- %5 = load i32* %arrayidx6, align 4
- %6 = load i32* %i, align 4
+ %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
+ %5 = load i32, i32* %arrayidx6, align 4
+ %6 = load i32, i32* %i, align 4
%idxprom7 = sext i32 %6 to i64
- %arrayidx8 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
- %7 = load i32* %arrayidx8, align 4
+ %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
+ %7 = load i32, i32* %arrayidx8, align 4
%add9 = add nsw i32 %5, %7
- %8 = load i32* %i, align 4
+ %8 = load i32, i32* %i, align 4
%idxprom10 = sext i32 %8 to i64
- %arrayidx11 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
+ %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
store i32 %add9, i32* %arrayidx11, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %9 = load i32* %i, align 4
+ %9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %10 = load i32* getelementptr inbounds ([10 x i32]* @zero_arr, i32 0, i64 9), align 4
+ %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
%cmp12 = icmp eq i32 %10, 110
%cond = select i1 %cmp12, i32 0, i32 -1
ret i32 %cond
diff --git a/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
index 9d11415c906f..6134b8b24641 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
@@ -1,7 +1,7 @@
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
define double @test(double* %DP, double %Arg) nounwind {
- %D = load double* %DP ; <double> [#uses=1]
+ %D = load double, double* %DP ; <double> [#uses=1]
%V = fadd double %D, 1.000000e+00 ; <double> [#uses=2]
%W = fsub double %V, %V ; <double> [#uses=3]
%X = fmul double %W, %W ; <double> [#uses=2]
diff --git a/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
index 40b514fd8e1f..5b7999c067e4 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 49
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll b/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
index 5119b72d4485..f9184b4077bb 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
@@ -12,24 +12,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 49
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
index ba3ffff21425..ad1af93ffdef 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
@@ -1,14 +1,14 @@
; RUN: %lli -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
-@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
-@ptr2 = global i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), align 4
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
entry:
- %0 = load i8** @ptr, align 4
- %1 = load i8** @ptr2, align 4
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
%cmp = icmp eq i8* %0, %1
%. = zext i1 %cmp to i32
ret i32 %.
diff --git a/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll b/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
index bbc71afdf7e3..d9a4faa8e6bd 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
@@ -2,14 +2,14 @@
; XFAIL: mips, aarch64, arm, i686, i386
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
-@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
-@ptr2 = global i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), align 4
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
entry:
- %0 = load i8** @ptr, align 4
- %1 = load i8** @ptr2, align 4
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
%cmp = icmp eq i8* %0, %1
%. = zext i1 %cmp to i32
ret i32 %.
diff --git a/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll b/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
index 9b83ed231e9e..6eebe44e3ff3 100644
--- a/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
@@ -20,14 +20,14 @@ entry:
pass_block:
ret void
fail_block:
- call i32 @puts(i8* getelementptr([46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
call void @exit(i32 1)
unreachable
}
define i1 @test() nounwind {
entry:
- %tmp = load i1 ()** @funcPtr
+ %tmp = load i1 ()*, i1 ()** @funcPtr
%eq = icmp eq i1 ()* %tmp, @test
ret i1 %eq
}
diff --git a/test/ExecutionEngine/MCJIT/stubs.ll b/test/ExecutionEngine/MCJIT/stubs.ll
index b7d922f2cb6d..5b7acc71d04c 100644
--- a/test/ExecutionEngine/MCJIT/stubs.ll
+++ b/test/ExecutionEngine/MCJIT/stubs.ll
@@ -19,14 +19,14 @@ entry:
pass_block:
ret void
fail_block:
- call i32 @puts(i8* getelementptr([46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
call void @exit(i32 1)
unreachable
}
define i1 @test() nounwind {
entry:
- %tmp = load i1 ()** @funcPtr
+ %tmp = load i1 ()*, i1 ()** @funcPtr
%eq = icmp eq i1 ()* %tmp, @test
ret i1 %eq
}
diff --git a/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll b/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
index a425b5c1e9b3..1bb074498d4a 100644
--- a/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
+++ b/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
@@ -13,7 +13,7 @@ entry:
%ptr = alloca i32, align 4
store i32 0, i32* %retval
store i32 ptrtoint (i32* @CS3 to i32), i32* %ptr, align 4
- %0 = load i32* %ptr, align 4
+ %0 = load i32, i32* %ptr, align 4
%and = and i32 %0, 15
%tobool = icmp ne i32 %and, 0
br i1 %tobool, label %if.then, label %if.else
@@ -27,6 +27,6 @@ if.else: ; preds = %entry
br label %return
return: ; preds = %if.else, %if.then
- %1 = load i32* %retval
+ %1 = load i32, i32* %retval
ret i32 %1
}
diff --git a/test/ExecutionEngine/MCJIT/test-common-symbols.ll b/test/ExecutionEngine/MCJIT/test-common-symbols.ll
index 19e2ce584689..b63c2fea6752 100644
--- a/test/ExecutionEngine/MCJIT/test-common-symbols.ll
+++ b/test/ExecutionEngine/MCJIT/test-common-symbols.ll
@@ -31,20 +31,20 @@ entry:
%retval = alloca i32, align 4
%i = alloca i32, align 4
store i32 0, i32* %retval
- %0 = load i32* @zero_int, align 4
+ %0 = load i32, i32* @zero_int, align 4
%add = add nsw i32 %0, 5
%idxprom = sext i32 %add to i64
- %arrayidx = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
store i32 40, i32* %arrayidx, align 4
- %1 = load double* @zero_double, align 8
+ %1 = load double, double* @zero_double, align 8
%cmp = fcmp olt double %1, 1.000000e+00
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
- %2 = load i32* @zero_int, align 4
+ %2 = load i32, i32* @zero_int, align 4
%add1 = add nsw i32 %2, 2
%idxprom2 = sext i32 %add1 to i64
- %arrayidx3 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
+ %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
store i32 70, i32* %arrayidx3, align 4
br label %if.end
@@ -53,35 +53,35 @@ if.end: ; preds = %if.then, %entry
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
- %3 = load i32* %i, align 4
+ %3 = load i32, i32* %i, align 4
%cmp4 = icmp slt i32 %3, 10
br i1 %cmp4, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %4 = load i32* %i, align 4
+ %4 = load i32, i32* %i, align 4
%sub = sub nsw i32 %4, 1
%idxprom5 = sext i32 %sub to i64
- %arrayidx6 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
- %5 = load i32* %arrayidx6, align 4
- %6 = load i32* %i, align 4
+ %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
+ %5 = load i32, i32* %arrayidx6, align 4
+ %6 = load i32, i32* %i, align 4
%idxprom7 = sext i32 %6 to i64
- %arrayidx8 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
- %7 = load i32* %arrayidx8, align 4
+ %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
+ %7 = load i32, i32* %arrayidx8, align 4
%add9 = add nsw i32 %5, %7
- %8 = load i32* %i, align 4
+ %8 = load i32, i32* %i, align 4
%idxprom10 = sext i32 %8 to i64
- %arrayidx11 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
+ %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
store i32 %add9, i32* %arrayidx11, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %9 = load i32* %i, align 4
+ %9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %10 = load i32* getelementptr inbounds ([10 x i32]* @zero_arr, i32 0, i64 9), align 4
+ %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
%cmp12 = icmp eq i32 %10, 110
%cond = select i1 %cmp12, i32 0, i32 -1
ret i32 %cond
diff --git a/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll b/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
index adb0550a72d7..c549a4465979 100644
--- a/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
+++ b/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
@@ -1,7 +1,7 @@
; RUN: %lli %s > /dev/null
define double @test(double* %DP, double %Arg) {
- %D = load double* %DP ; <double> [#uses=1]
+ %D = load double, double* %DP ; <double> [#uses=1]
%V = fadd double %D, 1.000000e+00 ; <double> [#uses=2]
%W = fsub double %V, %V ; <double> [#uses=3]
%X = fmul double %W, %W ; <double> [#uses=2]
diff --git a/test/ExecutionEngine/MCJIT/test-fp.ll b/test/ExecutionEngine/MCJIT/test-fp.ll
index 2bf0210d8b00..c65b5a6e96a2 100644
--- a/test/ExecutionEngine/MCJIT/test-fp.ll
+++ b/test/ExecutionEngine/MCJIT/test-fp.ll
@@ -1,7 +1,7 @@
; RUN: %lli %s > /dev/null
define double @test(double* %DP, double %Arg) {
- %D = load double* %DP ; <double> [#uses=1]
+ %D = load double, double* %DP ; <double> [#uses=1]
%V = fadd double %D, 1.000000e+00 ; <double> [#uses=2]
%W = fsub double %V, %V ; <double> [#uses=3]
%X = fmul double %W, %W ; <double> [#uses=2]
diff --git a/test/ExecutionEngine/MCJIT/test-global-ctors.ll b/test/ExecutionEngine/MCJIT/test-global-ctors.ll
index ec87d155d41b..6d132716d7d8 100644
--- a/test/ExecutionEngine/MCJIT/test-global-ctors.ll
+++ b/test/ExecutionEngine/MCJIT/test-global-ctors.ll
@@ -6,7 +6,7 @@
define i32 @main() nounwind {
entry:
- %0 = load i32* @var, align 4
+ %0 = load i32, i32* @var, align 4
ret i32 %0
}
diff --git a/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll b/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
index 26bd83808026..8ae496d0fab0 100644
--- a/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
@@ -12,24 +12,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 49
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll b/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
index 3877e9a58861..4595219fd247 100644
--- a/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
+++ b/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 49
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/MCJIT/test-global.ll b/test/ExecutionEngine/MCJIT/test-global.ll
index 69e545555649..2760ecd03e15 100644
--- a/test/ExecutionEngine/MCJIT/test-global.ll
+++ b/test/ExecutionEngine/MCJIT/test-global.ll
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 50
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/MCJIT/test-loadstore.ll b/test/ExecutionEngine/MCJIT/test-loadstore.ll
index 1797599a9d8d..68c85050f0ba 100644
--- a/test/ExecutionEngine/MCJIT/test-loadstore.ll
+++ b/test/ExecutionEngine/MCJIT/test-loadstore.ll
@@ -1,13 +1,13 @@
; RUN: %lli %s > /dev/null
define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) {
- %V = load i8* %P ; <i8> [#uses=1]
+ %V = load i8, i8* %P ; <i8> [#uses=1]
store i8 %V, i8* %P
- %V.upgrd.4 = load i16* %P.upgrd.1 ; <i16> [#uses=1]
+ %V.upgrd.4 = load i16, i16* %P.upgrd.1 ; <i16> [#uses=1]
store i16 %V.upgrd.4, i16* %P.upgrd.1
- %V.upgrd.5 = load i32* %P.upgrd.2 ; <i32> [#uses=1]
+ %V.upgrd.5 = load i32, i32* %P.upgrd.2 ; <i32> [#uses=1]
store i32 %V.upgrd.5, i32* %P.upgrd.2
- %V.upgrd.6 = load i64* %P.upgrd.3 ; <i64> [#uses=1]
+ %V.upgrd.6 = load i64, i64* %P.upgrd.3 ; <i64> [#uses=1]
store i64 %V.upgrd.6, i64* %P.upgrd.3
ret void
}
@@ -16,7 +16,7 @@ define i32 @varalloca(i32 %Size) {
;; Variable sized alloca
%X = alloca i32, i32 %Size ; <i32*> [#uses=2]
store i32 %Size, i32* %X
- %Y = load i32* %X ; <i32> [#uses=1]
+ %Y = load i32, i32* %X ; <i32> [#uses=1]
ret i32 %Y
}
diff --git a/test/ExecutionEngine/MCJIT/test-local.ll b/test/ExecutionEngine/MCJIT/test-local.ll
index ec5ba165408f..832e178de153 100644
--- a/test/ExecutionEngine/MCJIT/test-local.ll
+++ b/test/ExecutionEngine/MCJIT/test-local.ll
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 50
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* %count, align 4
+ %1 = load i32, i32* %count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* %count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* %count, align 4
+ %3 = load i32, i32* %count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll b/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
index 21bcaef3aa80..d50ba9dd5a0a 100644
--- a/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
@@ -2,14 +2,14 @@
; XFAIL: mips, aarch64, arm, i686, i386
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
-@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
-@ptr2 = global i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), align 4
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
entry:
- %0 = load i8** @ptr, align 4
- %1 = load i8** @ptr2, align 4
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
%cmp = icmp eq i8* %0, %1
%. = zext i1 %cmp to i32
ret i32 %.
diff --git a/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll b/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
index f139ddf12f81..9cb427414ec1 100644
--- a/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
+++ b/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
@@ -1,14 +1,14 @@
; RUN: %lli -O0 %s
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
-@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
-@ptr2 = global i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), align 4
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
entry:
- %0 = load i8** @ptr, align 4
- %1 = load i8** @ptr2, align 4
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
%cmp = icmp eq i8* %0, %1
%. = zext i1 %cmp to i32
ret i32 %.
diff --git a/test/ExecutionEngine/OrcLazy/anonymous_globals.ll b/test/ExecutionEngine/OrcLazy/anonymous_globals.ll
new file mode 100644
index 000000000000..c4c09a0d5a25
--- /dev/null
+++ b/test/ExecutionEngine/OrcLazy/anonymous_globals.ll
@@ -0,0 +1,18 @@
+; RUN: lli -jit-kind=orc-lazy %s
+
+define private void @0() {
+entry:
+ ret void
+}
+
+define private void @"\01L_foo"() {
+entry:
+ ret void
+}
+
+define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+entry:
+ call void @0()
+ tail call void @"\01L_foo"()
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/OrcLazy/hello.ll b/test/ExecutionEngine/OrcLazy/hello.ll
new file mode 100644
index 000000000000..c3cf0f346a1d
--- /dev/null
+++ b/test/ExecutionEngine/OrcLazy/hello.ll
@@ -0,0 +1,35 @@
+; RUN: lli -jit-kind=orc-lazy -orc-lazy-debug=funcs-to-stdout %s | FileCheck %s
+;
+; CHECK: Hello
+; CHECK: [ {{.*}}main ]
+; CHECK: Goodbye
+
+%class.Foo = type { i8 }
+
+@f = global %class.Foo zeroinitializer, align 1
+@__dso_handle = external global i8
+@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_hello.cpp, i8* null }]
+@str = private unnamed_addr constant [6 x i8] c"Hello\00"
+@str2 = private unnamed_addr constant [8 x i8] c"Goodbye\00"
+
+define linkonce_odr void @_ZN3FooD1Ev(%class.Foo* nocapture readnone %this) unnamed_addr align 2 {
+entry:
+ %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str2, i64 0, i64 0))
+ ret void
+}
+
+declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
+
+define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+entry:
+ ret i32 0
+}
+
+define internal void @_GLOBAL__sub_I_hello.cpp() {
+entry:
+ %puts.i.i.i = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
+ %0 = tail call i32 @__cxa_atexit(void (i8*)* bitcast (void (%class.Foo*)* @_ZN3FooD1Ev to void (i8*)*), i8* getelementptr inbounds (%class.Foo, %class.Foo* @f, i64 0, i32 0), i8* @__dso_handle)
+ ret void
+}
+
+declare i32 @puts(i8* nocapture readonly)
diff --git a/test/ExecutionEngine/OrcLazy/lit.local.cfg b/test/ExecutionEngine/OrcLazy/lit.local.cfg
new file mode 100644
index 000000000000..bf63c4f73ed6
--- /dev/null
+++ b/test/ExecutionEngine/OrcLazy/lit.local.cfg
@@ -0,0 +1,2 @@
+if config.root.host_arch not in ['x86_64']:
+ config.unsupported = True
diff --git a/test/ExecutionEngine/OrcLazy/private_linkage.ll b/test/ExecutionEngine/OrcLazy/private_linkage.ll
new file mode 100644
index 000000000000..11813dd97760
--- /dev/null
+++ b/test/ExecutionEngine/OrcLazy/private_linkage.ll
@@ -0,0 +1,12 @@
+; RUN: lli -jit-kind=orc-lazy %s
+
+define private void @_ZL3foov() {
+entry:
+ ret void
+}
+
+define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+entry:
+ tail call void @_ZL3foov()
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/2002-12-16-ArgTest.ll b/test/ExecutionEngine/OrcMCJIT/2002-12-16-ArgTest.ll
index eb2fe8c04832..825892e9fbdd 100644
--- a/test/ExecutionEngine/2002-12-16-ArgTest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2002-12-16-ArgTest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
@.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1]
@@ -13,7 +13,7 @@ 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 ) ; <i32>:0 [#uses=0]
+ call i32 (i8*, ...) @printf( i8* getelementptr ([10 x i8], [10 x i8]* @.LC0, i64 0, i64 0), i32 %argc ) ; <i32>:0 [#uses=0]
%cast224 = bitcast i8** %argv to i8* ; <i8*> [#uses=1]
%local = alloca i8* ; <i8**> [#uses=3]
store i8* %cast224, i8** %local
@@ -24,9 +24,9 @@ bb2: ; preds = %bb2, %bb0
%add1-indvar = add i32 %cann-indvar, 1 ; <i32> [#uses=2]
%cann-indvar-idxcast = sext i32 %cann-indvar to i64 ; <i64> [#uses=1]
%CT = bitcast i8** %local to i8*** ; <i8***> [#uses=1]
- %reg115 = load i8*** %CT ; <i8**> [#uses=1]
- %cast235 = getelementptr i8** %reg115, i64 %cann-indvar-idxcast ; <i8**> [#uses=1]
- %reg117 = load i8** %cast235 ; <i8*> [#uses=1]
+ %reg115 = load i8**, i8*** %CT ; <i8**> [#uses=1]
+ %cast235 = getelementptr i8*, i8** %reg115, i64 %cann-indvar-idxcast ; <i8**> [#uses=1]
+ %reg117 = load i8*, i8** %cast235 ; <i8*> [#uses=1]
%reg236 = call i32 @puts( i8* %reg117 ) ; <i32> [#uses=0]
%cond239 = icmp slt i32 %add1-indvar, %argc ; <i1> [#uses=1]
br i1 %cond239, label %bb2, label %bb3
diff --git a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll b/test/ExecutionEngine/OrcMCJIT/2003-01-04-ArgumentBug.ll
index 68fdefefa542..2061329f2521 100644
--- a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-01-04-ArgumentBug.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @foo(i32 %X, i32 %Y, double %A) {
%cond212 = fcmp une double %A, 1.000000e+00 ; <i1> [#uses=1]
diff --git a/test/ExecutionEngine/2003-01-04-LoopTest.ll b/test/ExecutionEngine/OrcMCJIT/2003-01-04-LoopTest.ll
index 5a0311dd9393..a298172e6780 100644
--- a/test/ExecutionEngine/2003-01-04-LoopTest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-01-04-LoopTest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
call i32 @mylog( i32 4 ) ; <i32>:1 [#uses=0]
diff --git a/test/ExecutionEngine/2003-01-04-PhiTest.ll b/test/ExecutionEngine/OrcMCJIT/2003-01-04-PhiTest.ll
index 48576e7c83e6..a24e188438fb 100644
--- a/test/ExecutionEngine/2003-01-04-PhiTest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-01-04-PhiTest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
; <label>:0
diff --git a/test/ExecutionEngine/2003-01-09-SARTest.ll b/test/ExecutionEngine/OrcMCJIT/2003-01-09-SARTest.ll
index ed58e1184377..8f79ff2a683a 100644
--- a/test/ExecutionEngine/2003-01-09-SARTest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-01-09-SARTest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /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/OrcMCJIT/2003-01-10-FUCOM.ll
index 4960e5969005..7e2ce669a7e2 100644
--- a/test/ExecutionEngine/2003-01-10-FUCOM.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-01-10-FUCOM.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
%X = fadd double 0.000000e+00, 1.000000e+00 ; <double> [#uses=1]
diff --git a/test/ExecutionEngine/2003-01-15-AlignmentTest.ll b/test/ExecutionEngine/OrcMCJIT/2003-01-15-AlignmentTest.ll
index 038d7500101f..38d5f83af038 100644
--- a/test/ExecutionEngine/2003-01-15-AlignmentTest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-01-15-AlignmentTest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @bar(i8* %X) {
; pointer should be 4 byte aligned!
diff --git a/test/ExecutionEngine/2003-05-06-LivenessClobber.ll b/test/ExecutionEngine/OrcMCJIT/2003-05-06-LivenessClobber.ll
index 576ef7cf6380..82bf97d2a929 100644
--- a/test/ExecutionEngine/2003-05-06-LivenessClobber.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-05-06-LivenessClobber.ll
@@ -1,11 +1,11 @@
; This testcase should return with an exit code of 1.
;
-; RUN: not %lli %s
+; RUN: not %lli -jit-kind=orc-mcjit %s
@test = global i64 0 ; <i64*> [#uses=1]
define internal i64 @test.upgrd.1() {
- %tmp.0 = load i64* @test ; <i64> [#uses=1]
+ %tmp.0 = load i64, i64* @test ; <i64> [#uses=1]
%tmp.1 = add i64 %tmp.0, 1 ; <i64> [#uses=1]
ret i64 %tmp.1
}
diff --git a/test/ExecutionEngine/OrcMCJIT/2003-05-07-ArgumentTest.ll b/test/ExecutionEngine/OrcMCJIT/2003-05-07-ArgumentTest.ll
new file mode 100644
index 000000000000..43e9ec956b24
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/2003-05-07-ArgumentTest.ll
@@ -0,0 +1,11 @@
+; RUN: %lli -jit-kind=orc-mcjit %s test
+
+declare i32 @puts(i8*)
+
+define i32 @main(i32 %argc.1, i8** %argv.1) {
+ %tmp.5 = getelementptr i8*, i8** %argv.1, i64 1 ; <i8**> [#uses=1]
+ %tmp.6 = load i8*, i8** %tmp.5 ; <i8*> [#uses=1]
+ %tmp.0 = call i32 @puts( i8* %tmp.6 ) ; <i32> [#uses=0]
+ ret i32 0
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/2003-05-11-PHIRegAllocBug.ll b/test/ExecutionEngine/OrcMCJIT/2003-05-11-PHIRegAllocBug.ll
new file mode 100644
index 000000000000..47988b9c0f05
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/2003-05-11-PHIRegAllocBug.ll
@@ -0,0 +1,13 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+
+define i32 @main() {
+entry:
+ br label %endif
+then: ; No predecessors!
+ br label %endif
+endif: ; preds = %then, %entry
+ %x = phi i32 [ 4, %entry ], [ 27, %then ] ; <i32> [#uses=0]
+ %result = phi i32 [ 32, %then ], [ 0, %entry ] ; <i32> [#uses=0]
+ ret i32 0
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/2003-06-04-bzip2-bug.ll b/test/ExecutionEngine/OrcMCJIT/2003-06-04-bzip2-bug.ll
new file mode 100644
index 000000000000..942b8362c700
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/2003-06-04-bzip2-bug.ll
@@ -0,0 +1,17 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+
+; Testcase distilled from 256.bzip2.
+
+define i32 @main() {
+entry:
+ br label %loopentry.0
+loopentry.0: ; preds = %loopentry.0, %entry
+ %h.0 = phi i32 [ %tmp.2, %loopentry.0 ], [ -1, %entry ] ; <i32> [#uses=1]
+ %tmp.2 = add i32 %h.0, 1 ; <i32> [#uses=3]
+ %tmp.4 = icmp ne i32 %tmp.2, 0 ; <i1> [#uses=1]
+ br i1 %tmp.4, label %loopentry.0, label %loopentry.1
+loopentry.1: ; preds = %loopentry.0
+ %h.1 = phi i32 [ %tmp.2, %loopentry.0 ] ; <i32> [#uses=1]
+ ret i32 %h.1
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/2003-06-05-PHIBug.ll b/test/ExecutionEngine/OrcMCJIT/2003-06-05-PHIBug.ll
new file mode 100644
index 000000000000..07bcbbde12d1
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/2003-06-05-PHIBug.ll
@@ -0,0 +1,15 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+
+; Testcase distilled from 256.bzip2.
+
+define i32 @main() {
+entry:
+ %X = add i32 1, -1 ; <i32> [#uses=3]
+ br label %Next
+Next: ; preds = %entry
+ %A = phi i32 [ %X, %entry ] ; <i32> [#uses=0]
+ %B = phi i32 [ %X, %entry ] ; <i32> [#uses=0]
+ %C = phi i32 [ %X, %entry ] ; <i32> [#uses=1]
+ ret i32 %C
+}
+
diff --git a/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll b/test/ExecutionEngine/OrcMCJIT/2003-08-15-AllocaAssertion.ll
index bee409c14411..43c26b7e1a09 100644
--- a/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-08-15-AllocaAssertion.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
; This testcase failed to work because two variable sized allocas confused the
; local register allocator.
diff --git a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll b/test/ExecutionEngine/OrcMCJIT/2003-08-21-EnvironmentTest.ll
index 63303fcff7c6..88dd46e2d631 100644
--- a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-08-21-EnvironmentTest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
;
; Regression Test: EnvironmentTest.ll
@@ -12,7 +12,7 @@
declare i32 @strlen(i8*)
define i32 @main(i32 %argc.1, i8** %argv.1, i8** %envp.1) {
- %tmp.2 = load i8** %envp.1 ; <i8*> [#uses=1]
+ %tmp.2 = load i8*, i8** %envp.1 ; <i8*> [#uses=1]
%tmp.3 = call i32 @strlen( i8* %tmp.2 ) ; <i32> [#uses=1]
%T = icmp eq i32 %tmp.3, 0 ; <i1> [#uses=1]
%R = zext i1 %T to i32 ; <i32> [#uses=1]
diff --git a/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll b/test/ExecutionEngine/OrcMCJIT/2003-08-23-RegisterAllocatePhysReg.ll
index 8fb1bbbe9d77..fc3734f151df 100644
--- a/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-08-23-RegisterAllocatePhysReg.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
; This testcase exposes a bug in the local register allocator where it runs out
; of registers (due to too many overlapping live ranges), but then attempts to
diff --git a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll b/test/ExecutionEngine/OrcMCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
index 6513540903e8..4e38184afe45 100644
--- a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
@A = global i32 0 ; <i32*> [#uses=1]
diff --git a/test/ExecutionEngine/2005-12-02-TailCallBug.ll b/test/ExecutionEngine/OrcMCJIT/2005-12-02-TailCallBug.ll
index 2ac8ad1795d8..aff7fce9b06e 100644
--- a/test/ExecutionEngine/2005-12-02-TailCallBug.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2005-12-02-TailCallBug.ll
@@ -1,5 +1,6 @@
; PR672
-; RUN: %lli %s
+; RUN: %lli -jit-kind=orc-mcjit %s
+; XFAIL: mcjit-ia32
define i32 @main() {
%f = bitcast i32 (i32, i32*, i32)* @check_tail to i32* ; <i32*> [#uses=1]
diff --git a/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll b/test/ExecutionEngine/OrcMCJIT/2007-12-10-APIntLoadStore.ll
index 418361163fcf..5bad45a587bf 100644
--- a/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2007-12-10-APIntLoadStore.ll
@@ -1,4 +1,4 @@
-; RUN: %lli -force-interpreter %s
+; RUN: %lli -jit-kind=orc-mcjit -force-interpreter %s
; PR1836
define i32 @main() {
@@ -9,11 +9,11 @@ entry:
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i75 999, i75* %x, align 16
store i32 0, i32* %tmp, align 4
- %tmp1 = load i32* %tmp, align 4 ; <i32> [#uses=1]
+ %tmp1 = load i32, i32* %tmp, align 4 ; <i32> [#uses=1]
store i32 %tmp1, i32* %retval, align 4
br label %return
return: ; preds = %entry
- %retval2 = load i32* %retval ; <i32> [#uses=1]
+ %retval2 = load i32, i32* %retval ; <i32> [#uses=1]
ret i32 %retval2
}
diff --git a/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll b/test/ExecutionEngine/OrcMCJIT/2008-06-05-APInt-OverAShr.ll
index 349db69e4c63..f67ae6a24894 100644
--- a/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll
+++ b/test/ExecutionEngine/OrcMCJIT/2008-06-05-APInt-OverAShr.ll
@@ -1,4 +1,4 @@
-; RUN: %lli -force-interpreter=true %s | FileCheck %s
+; RUN: %lli -jit-kind=orc-mcjit -force-interpreter=true %s | FileCheck %s
; CHECK: 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"
@@ -12,15 +12,15 @@ entry:
%tmp = alloca i65 ; <i65*> [#uses=2]
%"alloca point" = bitcast i65 0 to i65 ; <i65> [#uses=0]
store i65 %x, i65* %x_addr
- %tmp1 = load i65* %x_addr, align 4 ; <i65> [#uses=1]
+ %tmp1 = load i65, i65* %x_addr, align 4 ; <i65> [#uses=1]
%tmp2 = ashr i65 %tmp1, 65 ; <i65> [#uses=1]
store i65 %tmp2, i65* %tmp, align 4
- %tmp3 = load i65* %tmp, align 4 ; <i65> [#uses=1]
+ %tmp3 = load i65, i65* %tmp, align 4 ; <i65> [#uses=1]
store i65 %tmp3, i65* %retval, align 4
br label %return
return: ; preds = %entry
- %retval4 = load i65* %retval ; <i65> [#uses=1]
+ %retval4 = load i65, i65* %retval ; <i65> [#uses=1]
ret i65 %retval4
}
@@ -46,14 +46,14 @@ cond_false: ; preds = %entry
br label %cond_next
cond_next: ; preds = %cond_false, %cond_true
- %tmp5 = getelementptr [10 x i8]* @.str, i32 0, i32 0 ; <i8*> [#uses=1]
- %tmp6 = load i32* %iftmp.0, align 4 ; <i32> [#uses=1]
- %tmp7 = call i32 (i8*, ...)* @printf( i8* noalias %tmp5, i32 %tmp6 ) nounwind ; <i32> [#uses=0]
+ %tmp5 = getelementptr [10 x i8], [10 x i8]* @.str, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp6 = load i32, i32* %iftmp.0, align 4 ; <i32> [#uses=1]
+ %tmp7 = call i32 (i8*, ...) @printf( i8* noalias %tmp5, i32 %tmp6 ) nounwind ; <i32> [#uses=0]
br label %return
return: ; preds = %cond_next
store i32 0, i32* %retval, align 4
- %retval8 = load i32* %retval ; <i32> [#uses=1]
+ %retval8 = load i32, i32* %retval ; <i32> [#uses=1]
ret i32 %retval8
}
diff --git a/test/ExecutionEngine/OrcMCJIT/2013-04-04-RelocAddend.ll b/test/ExecutionEngine/OrcMCJIT/2013-04-04-RelocAddend.ll
new file mode 100644
index 000000000000..94ccf957c82e
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/2013-04-04-RelocAddend.ll
@@ -0,0 +1,25 @@
+; RUN: %lli -jit-kind=orc-mcjit %s
+;
+; Verify relocations to global symbols with addend work correctly.
+;
+; Compiled from this C code:
+;
+; int test[2] = { -1, 0 };
+; int *p = &test[1];
+;
+; int main (void)
+; {
+; return *p;
+; }
+;
+
+@test = global [2 x i32] [i32 -1, i32 0], align 4
+@p = global i32* getelementptr inbounds ([2 x i32], [2 x i32]* @test, i64 0, i64 1), align 8
+
+define i32 @main() {
+entry:
+ %0 = load i32*, i32** @p, align 8
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/Inputs/cross-module-b.ll b/test/ExecutionEngine/OrcMCJIT/Inputs/cross-module-b.ll
new file mode 100644
index 000000000000..687011741103
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/Inputs/cross-module-b.ll
@@ -0,0 +1,7 @@
+declare i32 @FA()
+
+define i32 @FB() {
+ %r = call i32 @FA( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-b.ll b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-b.ll
new file mode 100644
index 000000000000..103b601e7f08
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-b.ll
@@ -0,0 +1,7 @@
+declare i32 @FC()
+
+define i32 @FB() {
+ %r = call i32 @FC( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-c.ll b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-c.ll
new file mode 100644
index 000000000000..b39306be9e3b
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-c.ll
@@ -0,0 +1,4 @@
+define i32 @FC() {
+ ret i32 0
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
new file mode 100644
index 000000000000..d7dbb032b5d0
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
@@ -0,0 +1,30 @@
+declare i8* @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(i8*, i8*, i8*)
+declare i32 @__gxx_personality_v0(...)
+declare void @__cxa_end_catch()
+declare i8* @__cxa_begin_catch(i8*)
+
+@_ZTIi = external constant i8*
+
+define void @throwException_B() {
+ %exception = tail call i8* @__cxa_allocate_exception(i64 4)
+ call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+ unreachable
+}
+
+define i32 @FB() {
+entry:
+ invoke void @throwException_B()
+ to label %try.cont unwind label %lpad
+
+lpad:
+ %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* bitcast (i8** @_ZTIi to i8*)
+ %e = extractvalue { i8*, i32 } %p, 0
+ call i8* @__cxa_begin_catch(i8* %e)
+ call void @__cxa_end_catch()
+ br label %try.cont
+
+try.cont:
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/cross-module-a.ll b/test/ExecutionEngine/OrcMCJIT/cross-module-a.ll
new file mode 100644
index 000000000000..451b2662ddf9
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/cross-module-a.ll
@@ -0,0 +1,13 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/cross-module-b.ll %s > /dev/null
+
+declare i32 @FB()
+
+define i32 @FA() {
+ ret i32 0
+}
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll b/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
new file mode 100644
index 000000000000..4f5afd0ed475
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
@@ -0,0 +1,14 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/cross-module-b.ll -relocation-model=pic -code-model=small %s > /dev/null
+; XFAIL: mips, i686, i386
+
+declare i32 @FB()
+
+define i32 @FA() {
+ ret i32 0
+}
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll b/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
new file mode 100644
index 000000000000..32b53c4847bc
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
@@ -0,0 +1,32 @@
+; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=large %s
+; XFAIL: cygwin, win32, mingw, mips, i686, i386, aarch64, arm, asan, msan
+declare i8* @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(i8*, i8*, i8*)
+declare i32 @__gxx_personality_v0(...)
+declare void @__cxa_end_catch()
+declare i8* @__cxa_begin_catch(i8*)
+
+@_ZTIi = external constant i8*
+
+define void @throwException() {
+ %exception = tail call i8* @__cxa_allocate_exception(i64 4)
+ call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+ unreachable
+}
+
+define i32 @main() {
+entry:
+ invoke void @throwException()
+ to label %try.cont unwind label %lpad
+
+lpad:
+ %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* bitcast (i8** @_ZTIi to i8*)
+ %e = extractvalue { i8*, i32 } %p, 0
+ call i8* @__cxa_begin_catch(i8* %e)
+ call void @__cxa_end_catch()
+ br label %try.cont
+
+try.cont:
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
new file mode 100644
index 000000000000..a54795ead56d
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
@@ -0,0 +1,32 @@
+; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=small %s
+; XFAIL: cygwin, win32, mingw, mips, i686, i386, darwin, aarch64, arm, asan, msan
+declare i8* @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(i8*, i8*, i8*)
+declare i32 @__gxx_personality_v0(...)
+declare void @__cxa_end_catch()
+declare i8* @__cxa_begin_catch(i8*)
+
+@_ZTIi = external constant i8*
+
+define void @throwException() {
+ %exception = tail call i8* @__cxa_allocate_exception(i64 4)
+ call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+ unreachable
+}
+
+define i32 @main() {
+entry:
+ invoke void @throwException()
+ to label %try.cont unwind label %lpad
+
+lpad:
+ %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* bitcast (i8** @_ZTIi to i8*)
+ %e = extractvalue { i8*, i32 } %p, 0
+ call i8* @__cxa_begin_catch(i8* %e)
+ call void @__cxa_end_catch()
+ br label %try.cont
+
+try.cont:
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/eh.ll b/test/ExecutionEngine/OrcMCJIT/eh.ll
new file mode 100644
index 000000000000..2de6a517b2b3
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/eh.ll
@@ -0,0 +1,32 @@
+; RUN: %lli -jit-kind=orc-mcjit %s
+; XFAIL: arm, cygwin, win32, mingw, asan, msan
+declare i8* @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(i8*, i8*, i8*)
+declare i32 @__gxx_personality_v0(...)
+declare void @__cxa_end_catch()
+declare i8* @__cxa_begin_catch(i8*)
+
+@_ZTIi = external constant i8*
+
+define void @throwException() {
+ %exception = tail call i8* @__cxa_allocate_exception(i64 4)
+ call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+ unreachable
+}
+
+define i32 @main() {
+entry:
+ invoke void @throwException()
+ to label %try.cont unwind label %lpad
+
+lpad:
+ %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* bitcast (i8** @_ZTIi to i8*)
+ %e = extractvalue { i8*, i32 } %p, 0
+ call i8* @__cxa_begin_catch(i8* %e)
+ call void @__cxa_end_catch()
+ br label %try.cont
+
+try.cont:
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/fpbitcast.ll b/test/ExecutionEngine/OrcMCJIT/fpbitcast.ll
index e6d06f83db49..d2dbe316ad20 100644
--- a/test/ExecutionEngine/fpbitcast.ll
+++ b/test/ExecutionEngine/OrcMCJIT/fpbitcast.ll
@@ -1,4 +1,4 @@
-; RUN: %lli -force-interpreter=true %s | FileCheck %s
+; RUN: %lli -jit-kind=orc-mcjit -force-interpreter=true %s | FileCheck %s
; CHECK: 40091eb8
define i32 @test(double %x) {
@@ -12,8 +12,8 @@ entry:
define i32 @main()
{
%res = call i32 @test(double 3.14)
- %ptr = getelementptr [4 x i8]* @format, i32 0, i32 0
- call i32 (i8*,...)* @printf(i8* %ptr, i32 %res)
+ %ptr = getelementptr [4 x i8], [4 x i8]* @format, i32 0, i32 0
+ call i32 (i8*,...) @printf(i8* %ptr, i32 %res)
ret i32 0
}
diff --git a/test/ExecutionEngine/OrcMCJIT/hello.ll b/test/ExecutionEngine/OrcMCJIT/hello.ll
new file mode 100644
index 000000000000..08413c2b5824
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/hello.ll
@@ -0,0 +1,11 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+
+@.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1]
+
+declare i32 @puts(i8*)
+
+define i32 @main() {
+ %reg210 = call i32 @puts( i8* getelementptr ([12 x i8], [12 x i8]* @.LC0, i64 0, i64 0) ) ; <i32> [#uses=0]
+ ret i32 0
+}
+
diff --git a/test/ExecutionEngine/hello2.ll b/test/ExecutionEngine/OrcMCJIT/hello2.ll
index 13b25884fee7..bb6a9cf12f7c 100644
--- a/test/ExecutionEngine/hello2.ll
+++ b/test/ExecutionEngine/OrcMCJIT/hello2.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
@X = global i32 7 ; <i32*> [#uses=0]
@msg = internal global [13 x i8] c"Hello World\0A\00" ; <[13 x i8]*> [#uses=1]
@@ -6,7 +6,7 @@
declare void @printf([13 x i8]*, ...)
define void @bar() {
- call void ([13 x i8]*, ...)* @printf( [13 x i8]* @msg )
+ call void ([13 x i8]*, ...) @printf( [13 x i8]* @msg )
ret void
}
diff --git a/test/ExecutionEngine/OrcMCJIT/lit.local.cfg b/test/ExecutionEngine/OrcMCJIT/lit.local.cfg
new file mode 100644
index 000000000000..f98140357736
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/lit.local.cfg
@@ -0,0 +1,26 @@
+root = config.root
+targets = root.targets
+if ('X86' in targets) | ('AArch64' in targets) | ('ARM' in targets) | \
+ ('Mips' in targets) | ('PowerPC' in targets) | ('SystemZ' in targets):
+ config.unsupported = False
+else:
+ config.unsupported = True
+
+# FIXME: autoconf and cmake produce different arch names. We should normalize
+# them before getting here.
+if root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
+ 'AArch64', 'ARM', 'Mips', 'PowerPC', 'ppc64', 'SystemZ']:
+ config.unsupported = True
+
+if 'armv7' in root.host_arch:
+ config.unsupported = False
+
+if 'i386-apple-darwin' in root.target_triple:
+ config.unsupported = True
+
+if 'powerpc' in root.target_triple and not 'powerpc64' in root.target_triple:
+ config.unsupported = True
+
+# ExecutionEngine tests are not expected to pass in a cross-compilation setup.
+if 'native' not in config.available_features:
+ config.unsupported = True
diff --git a/test/ExecutionEngine/OrcMCJIT/load-object-a.ll b/test/ExecutionEngine/OrcMCJIT/load-object-a.ll
new file mode 100644
index 000000000000..abd470df5473
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/load-object-a.ll
@@ -0,0 +1,24 @@
+; This first line will generate the .o files for the next run line
+; RUN: rm -rf %t.cachedir %t.cachedir2 %t.cachedir3
+; RUN: mkdir -p %t.cachedir %t.cachedir2 %t.cachedir3
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -enable-cache-manager -object-cache-dir=%t.cachedir %s
+
+; Collect generated objects.
+; RUN: find %t.cachedir -type f -name 'multi-module-?.o' -exec mv -v '{}' %t.cachedir2 ';'
+
+; This line tests MCJIT object loading
+; RUN: %lli -jit-kind=orc-mcjit -extra-object=%t.cachedir2/multi-module-b.o -extra-object=%t.cachedir2/multi-module-c.o %s
+
+; These lines put the object files into an archive
+; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-b.o
+; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-c.o
+
+; This line test MCJIT archive loading
+; RUN: %lli -jit-kind=orc-mcjit -extra-archive=%t.cachedir3/load-object.a %s
+
+declare i32 @FB()
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/multi-module-a.ll b/test/ExecutionEngine/OrcMCJIT/multi-module-a.ll
new file mode 100644
index 000000000000..d622efca03e5
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/multi-module-a.ll
@@ -0,0 +1,9 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll %s > /dev/null
+
+declare i32 @FB()
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll b/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
new file mode 100644
index 000000000000..f77cb44a878f
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
@@ -0,0 +1,35 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-eh-b.ll %s
+; XFAIL: arm, cygwin, win32, mingw, asan, msan
+declare i8* @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(i8*, i8*, i8*)
+declare i32 @__gxx_personality_v0(...)
+declare void @__cxa_end_catch()
+declare i8* @__cxa_begin_catch(i8*)
+
+@_ZTIi = external constant i8*
+
+declare i32 @FB()
+
+define void @throwException() {
+ %exception = tail call i8* @__cxa_allocate_exception(i64 4)
+ call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+ unreachable
+}
+
+define i32 @main() {
+entry:
+ invoke void @throwException()
+ to label %try.cont unwind label %lpad
+
+lpad:
+ %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* bitcast (i8** @_ZTIi to i8*)
+ %e = extractvalue { i8*, i32 } %p, 0
+ call i8* @__cxa_begin_catch(i8* %e)
+ call void @__cxa_end_catch()
+ br label %try.cont
+
+try.cont:
+ %r = call i32 @FB( )
+ ret i32 %r
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll b/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
new file mode 100644
index 000000000000..80b8e163d5d6
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
@@ -0,0 +1,10 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -relocation-model=pic -code-model=small %s > /dev/null
+; XFAIL: mips, i686, i386
+
+declare i32 @FB()
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/non-extern-addend.ll b/test/ExecutionEngine/OrcMCJIT/non-extern-addend.ll
new file mode 100644
index 000000000000..bb2f7e4d325e
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/non-extern-addend.ll
@@ -0,0 +1,21 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+
+define i32 @foo(i32 %x, i32 %y, double %d) {
+entry:
+ %d.int64 = bitcast double %d to i64
+ %d.top64 = lshr i64 %d.int64, 32
+ %d.top = trunc i64 %d.top64 to i32
+ %d.bottom = trunc i64 %d.int64 to i32
+ %topCorrect = icmp eq i32 %d.top, 3735928559
+ %bottomCorrect = icmp eq i32 %d.bottom, 4277009102
+ %right = and i1 %topCorrect, %bottomCorrect
+ %nRight = xor i1 %right, true
+ %retVal = zext i1 %nRight to i32
+ ret i32 %retVal
+}
+
+define i32 @main() {
+entry:
+ %call = call i32 @foo(i32 0, i32 1, double 0xDEADBEEFFEEDFACE)
+ ret i32 %call
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/pr13727.ll b/test/ExecutionEngine/OrcMCJIT/pr13727.ll
new file mode 100644
index 000000000000..a48c573ba28d
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/pr13727.ll
@@ -0,0 +1,88 @@
+; RUN: %lli -jit-kind=orc-mcjit -O0 -disable-lazy-compilation=false %s
+
+; The intention of this test is to verify that symbols mapped to COMMON in ELF
+; work as expected.
+;
+; Compiled from this C code:
+;
+; int zero_int;
+; double zero_double;
+; int zero_arr[10];
+;
+; int main()
+; {
+; zero_arr[zero_int + 5] = 40;
+;
+; if (zero_double < 1.1)
+; zero_arr[zero_int + 2] = 70;
+;
+; for (int i = 1; i < 10; ++i) {
+; zero_arr[i] = zero_arr[i - 1] + zero_arr[i];
+; }
+; return zero_arr[9] == 110 ? 0 : -1;
+; }
+
+@zero_int = common global i32 0, align 4
+@zero_arr = common global [10 x i32] zeroinitializer, align 16
+@zero_double = common global double 0.000000e+00, align 8
+
+define i32 @main() nounwind {
+entry:
+ %retval = alloca i32, align 4
+ %i = alloca i32, align 4
+ store i32 0, i32* %retval
+ %0 = load i32, i32* @zero_int, align 4
+ %add = add nsw i32 %0, 5
+ %idxprom = sext i32 %add to i64
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
+ store i32 40, i32* %arrayidx, align 4
+ %1 = load double, double* @zero_double, align 8
+ %cmp = fcmp olt double %1, 1.100000e+00
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ %2 = load i32, i32* @zero_int, align 4
+ %add1 = add nsw i32 %2, 2
+ %idxprom2 = sext i32 %add1 to i64
+ %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
+ store i32 70, i32* %arrayidx3, align 4
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ store i32 1, i32* %i, align 4
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %if.end
+ %3 = load i32, i32* %i, align 4
+ %cmp4 = icmp slt i32 %3, 10
+ br i1 %cmp4, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ %4 = load i32, i32* %i, align 4
+ %sub = sub nsw i32 %4, 1
+ %idxprom5 = sext i32 %sub to i64
+ %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
+ %5 = load i32, i32* %arrayidx6, align 4
+ %6 = load i32, i32* %i, align 4
+ %idxprom7 = sext i32 %6 to i64
+ %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
+ %7 = load i32, i32* %arrayidx8, align 4
+ %add9 = add nsw i32 %5, %7
+ %8 = load i32, i32* %i, align 4
+ %idxprom10 = sext i32 %8 to i64
+ %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
+ store i32 %add9, i32* %arrayidx11, align 4
+ br label %for.inc
+
+for.inc: ; preds = %for.body
+ %9 = load i32, i32* %i, align 4
+ %inc = add nsw i32 %9, 1
+ store i32 %inc, i32* %i, align 4
+ br label %for.cond
+
+for.end: ; preds = %for.cond
+ %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
+ %cmp12 = icmp eq i32 %10, 110
+ %cond = select i1 %cmp12, i32 0, i32 -1
+ ret i32 %cond
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/Inputs/cross-module-b.ll b/test/ExecutionEngine/OrcMCJIT/remote/Inputs/cross-module-b.ll
new file mode 100644
index 000000000000..bc13b1de8ef6
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/Inputs/cross-module-b.ll
@@ -0,0 +1,7 @@
+declare i32 @FA()
+
+define i32 @FB() nounwind {
+ %r = call i32 @FA( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-b.ll b/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-b.ll
new file mode 100644
index 000000000000..0b8d5eb37adb
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-b.ll
@@ -0,0 +1,7 @@
+declare i32 @FC()
+
+define i32 @FB() nounwind {
+ %r = call i32 @FC( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-c.ll b/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-c.ll
new file mode 100644
index 000000000000..98350a8c106e
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-c.ll
@@ -0,0 +1,4 @@
+define i32 @FC() nounwind {
+ ret i32 0
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/cross-module-a.ll b/test/ExecutionEngine/OrcMCJIT/remote/cross-module-a.ll
new file mode 100644
index 000000000000..16553ebd2ade
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/cross-module-a.ll
@@ -0,0 +1,12 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
+
+declare i32 @FB()
+
+define i32 @FA() nounwind {
+ ret i32 0
+}
+
+define i32 @main() nounwind {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/cross-module-sm-pic-a.ll b/test/ExecutionEngine/OrcMCJIT/remote/cross-module-sm-pic-a.ll
new file mode 100644
index 000000000000..c8979043857e
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/cross-module-sm-pic-a.ll
@@ -0,0 +1,14 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext -relocation-model=pic -code-model=small %s > /dev/null
+; XFAIL: mips, i686, i386, arm
+
+declare i32 @FB()
+
+define i32 @FA() {
+ ret i32 0
+}
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/lit.local.cfg b/test/ExecutionEngine/OrcMCJIT/remote/lit.local.cfg
new file mode 100644
index 000000000000..625d82dc6189
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/lit.local.cfg
@@ -0,0 +1,8 @@
+if 'armv4' in config.root.target_triple or \
+ 'armv5' in config.root.target_triple:
+ config.unsupported = True
+
+# This is temporary, until Remote MCJIT works on ARM
+# See http://llvm.org/bugs/show_bug.cgi?id=18057
+#if 'armv7' in config.root.target_triple:
+# config.unsupported = True
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/multi-module-a.ll b/test/ExecutionEngine/OrcMCJIT/remote/multi-module-a.ll
new file mode 100644
index 000000000000..aa3434862305
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/multi-module-a.ll
@@ -0,0 +1,9 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
+
+declare i32 @FB()
+
+define i32 @main() nounwind {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/multi-module-sm-pic-a.ll b/test/ExecutionEngine/OrcMCJIT/remote/multi-module-sm-pic-a.ll
new file mode 100644
index 000000000000..41812d25169c
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/multi-module-sm-pic-a.ll
@@ -0,0 +1,10 @@
+; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext -relocation-model=pic -code-model=small %s > /dev/null
+; XFAIL: mips, i686, i386, arm
+
+declare i32 @FB()
+
+define i32 @main() {
+ %r = call i32 @FB( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/simpletest-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/simpletest-remote.ll
new file mode 100644
index 000000000000..45e11fce5a6e
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/simpletest-remote.ll
@@ -0,0 +1,10 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
+
+define i32 @bar() nounwind {
+ ret i32 0
+}
+
+define i32 @main() nounwind {
+ %r = call i32 @bar( ) ; <i32> [#uses=1]
+ ret i32 %r
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/stubs-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/stubs-remote.ll
new file mode 100644
index 000000000000..aeff011d5edb
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/stubs-remote.ll
@@ -0,0 +1,37 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
+; XFAIL: *
+; This test should fail until remote symbol resolution is supported.
+
+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], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call void @exit(i32 1)
+ unreachable
+}
+
+define i1 @test() nounwind {
+entry:
+ %tmp = load i1 ()*, 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/OrcMCJIT/remote/stubs-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/remote/stubs-sm-pic.ll
new file mode 100644
index 000000000000..a67edba1d231
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/stubs-sm-pic.ll
@@ -0,0 +1,37 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -disable-lazy-compilation=false -relocation-model=pic -code-model=small %s
+; XFAIL: *
+; This function should fail until remote symbol resolution is supported.
+
+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], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call void @exit(i32 1)
+ unreachable
+}
+
+define i1 @test() nounwind {
+entry:
+ %tmp = load i1 ()*, 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/OrcMCJIT/remote/test-common-symbols-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-common-symbols-remote.ll
new file mode 100644
index 000000000000..7e4dc056027c
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-common-symbols-remote.ll
@@ -0,0 +1,88 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
+
+; The intention of this test is to verify that symbols mapped to COMMON in ELF
+; work as expected.
+;
+; Compiled from this C code:
+;
+; int zero_int;
+; double zero_double;
+; int zero_arr[10];
+;
+; int main()
+; {
+; zero_arr[zero_int + 5] = 40;
+;
+; if (zero_double < 1.0)
+; zero_arr[zero_int + 2] = 70;
+;
+; for (int i = 1; i < 10; ++i) {
+; zero_arr[i] = zero_arr[i - 1] + zero_arr[i];
+; }
+; return zero_arr[9] == 110 ? 0 : -1;
+; }
+
+@zero_int = common global i32 0, align 4
+@zero_arr = common global [10 x i32] zeroinitializer, align 16
+@zero_double = common global double 0.000000e+00, align 8
+
+define i32 @main() nounwind {
+entry:
+ %retval = alloca i32, align 4
+ %i = alloca i32, align 4
+ store i32 0, i32* %retval
+ %0 = load i32, i32* @zero_int, align 4
+ %add = add nsw i32 %0, 5
+ %idxprom = sext i32 %add to i64
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
+ store i32 40, i32* %arrayidx, align 4
+ %1 = load double, double* @zero_double, align 8
+ %cmp = fcmp olt double %1, 1.000000e+00
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ %2 = load i32, i32* @zero_int, align 4
+ %add1 = add nsw i32 %2, 2
+ %idxprom2 = sext i32 %add1 to i64
+ %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
+ store i32 70, i32* %arrayidx3, align 4
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ store i32 1, i32* %i, align 4
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %if.end
+ %3 = load i32, i32* %i, align 4
+ %cmp4 = icmp slt i32 %3, 10
+ br i1 %cmp4, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ %4 = load i32, i32* %i, align 4
+ %sub = sub nsw i32 %4, 1
+ %idxprom5 = sext i32 %sub to i64
+ %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
+ %5 = load i32, i32* %arrayidx6, align 4
+ %6 = load i32, i32* %i, align 4
+ %idxprom7 = sext i32 %6 to i64
+ %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
+ %7 = load i32, i32* %arrayidx8, align 4
+ %add9 = add nsw i32 %5, %7
+ %8 = load i32, i32* %i, align 4
+ %idxprom10 = sext i32 %8 to i64
+ %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
+ store i32 %add9, i32* %arrayidx11, align 4
+ br label %for.inc
+
+for.inc: ; preds = %for.body
+ %9 = load i32, i32* %i, align 4
+ %inc = add nsw i32 %9, 1
+ store i32 %inc, i32* %i, align 4
+ br label %for.cond
+
+for.end: ; preds = %for.cond
+ %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
+ %cmp12 = icmp eq i32 %10, 110
+ %cond = select i1 %cmp12, i32 0, i32 -1
+ ret i32 %cond
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/test-data-align-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-data-align-remote.ll
new file mode 100644
index 000000000000..95c9b825a8d3
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-data-align-remote.ll
@@ -0,0 +1,15 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
+
+; Check that a variable is always aligned as specified.
+
+@var = global i32 0, align 32
+define i32 @main() nounwind {
+ %addr = ptrtoint i32* @var to i64
+ %mask = and i64 %addr, 31
+ %tst = icmp eq i64 %mask, 0
+ br i1 %tst, label %good, label %bad
+good:
+ ret i32 0
+bad:
+ ret i32 1
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/test-fp-no-external-funcs-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-fp-no-external-funcs-remote.ll
new file mode 100644
index 000000000000..286710338841
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-fp-no-external-funcs-remote.ll
@@ -0,0 +1,20 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
+
+define double @test(double* %DP, double %Arg) nounwind {
+ %D = load double, double* %DP ; <double> [#uses=1]
+ %V = fadd double %D, 1.000000e+00 ; <double> [#uses=2]
+ %W = fsub double %V, %V ; <double> [#uses=3]
+ %X = fmul double %W, %W ; <double> [#uses=2]
+ %Y = fdiv double %X, %X ; <double> [#uses=2]
+ %Q = fadd double %Y, %Arg ; <double> [#uses=1]
+ %R = bitcast double %Q to double ; <double> [#uses=1]
+ store double %Q, double* %DP
+ ret double %Y
+}
+
+define i32 @main() nounwind {
+ %X = alloca double ; <double*> [#uses=2]
+ store double 0.000000e+00, double* %X
+ call double @test( double* %X, double 2.000000e+00 ) ; <double>:1 [#uses=0]
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-remote.ll
new file mode 100644
index 000000000000..5dabb8f44d68
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-remote.ll
@@ -0,0 +1,34 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
+
+@count = global i32 1, align 4
+
+define i32 @main() nounwind {
+entry:
+ %retval = alloca i32, align 4
+ %i = alloca i32, align 4
+ store i32 0, i32* %retval
+ store i32 0, i32* %i, align 4
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %entry
+ %0 = load i32, i32* %i, align 4
+ %cmp = icmp slt i32 %0, 49
+ br i1 %cmp, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ %1 = load i32, i32* @count, align 4
+ %inc = add nsw i32 %1, 1
+ store i32 %inc, i32* @count, align 4
+ br label %for.inc
+
+for.inc: ; preds = %for.body
+ %2 = load i32, i32* %i, align 4
+ %inc1 = add nsw i32 %2, 1
+ store i32 %inc1, i32* %i, align 4
+ br label %for.cond
+
+for.end: ; preds = %for.cond
+ %3 = load i32, i32* @count, align 4
+ %sub = sub nsw i32 %3, 50
+ ret i32 %sub
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
new file mode 100644
index 000000000000..ec9e1ae1a03c
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
@@ -0,0 +1,35 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -relocation-model=pic -code-model=small %s > /dev/null
+; XFAIL: mips, aarch64, arm, i686, i386
+
+@count = global i32 1, align 4
+
+define i32 @main() nounwind uwtable {
+entry:
+ %retval = alloca i32, align 4
+ %i = alloca i32, align 4
+ store i32 0, i32* %retval
+ store i32 0, i32* %i, align 4
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %entry
+ %0 = load i32, i32* %i, align 4
+ %cmp = icmp slt i32 %0, 49
+ br i1 %cmp, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ %1 = load i32, i32* @count, align 4
+ %inc = add nsw i32 %1, 1
+ store i32 %inc, i32* @count, align 4
+ br label %for.inc
+
+for.inc: ; preds = %for.body
+ %2 = load i32, i32* %i, align 4
+ %inc1 = add nsw i32 %2, 1
+ store i32 %inc1, i32* %i, align 4
+ br label %for.cond
+
+for.end: ; preds = %for.cond
+ %3 = load i32, i32* @count, align 4
+ %sub = sub nsw i32 %3, 50
+ ret i32 %sub
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-remote.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-remote.ll
new file mode 100644
index 000000000000..aa07db9f512d
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-remote.ll
@@ -0,0 +1,15 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
+
+@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+entry:
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
+ %cmp = icmp eq i8* %0, %1
+ %. = zext i1 %cmp to i32
+ ret i32 %.
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
new file mode 100644
index 000000000000..61321ac1b947
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
@@ -0,0 +1,17 @@
+; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -relocation-model=pic -code-model=small %s
+; XFAIL: mips, aarch64, arm, i686, i386
+
+@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+entry:
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
+ %cmp = icmp eq i8* %0, %1
+ %. = zext i1 %cmp to i32
+ ret i32 %.
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/simplesttest.ll b/test/ExecutionEngine/OrcMCJIT/simplesttest.ll
new file mode 100644
index 000000000000..4a47131ada22
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/simplesttest.ll
@@ -0,0 +1,6 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+
+define i32 @main() {
+ ret i32 0
+}
+
diff --git a/test/ExecutionEngine/simpletest.ll b/test/ExecutionEngine/OrcMCJIT/simpletest.ll
index 167a0fdfd130..be1148be8a54 100644
--- a/test/ExecutionEngine/simpletest.ll
+++ b/test/ExecutionEngine/OrcMCJIT/simpletest.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @bar() {
ret i32 0
diff --git a/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
new file mode 100644
index 000000000000..f354a0de0935
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
@@ -0,0 +1,36 @@
+; RUN: %lli -jit-kind=orc-mcjit -disable-lazy-compilation=false -relocation-model=pic -code-model=small %s
+; XFAIL: mips, i686, i386, aarch64, arm
+
+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], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call void @exit(i32 1)
+ unreachable
+}
+
+define i1 @test() nounwind {
+entry:
+ %tmp = load i1 ()*, 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/stubs.ll b/test/ExecutionEngine/OrcMCJIT/stubs.ll
index b7d922f2cb6d..c096f5fd7e78 100644
--- a/test/ExecutionEngine/stubs.ll
+++ b/test/ExecutionEngine/OrcMCJIT/stubs.ll
@@ -1,4 +1,4 @@
-; RUN: %lli -disable-lazy-compilation=false %s
+; RUN: %lli -jit-kind=orc-mcjit -disable-lazy-compilation=false %s
define i32 @main() nounwind {
entry:
@@ -19,14 +19,14 @@ entry:
pass_block:
ret void
fail_block:
- call i32 @puts(i8* getelementptr([46 x i8]* @lcaic_failure, i32 0, i32 0))
+ call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
call void @exit(i32 1)
unreachable
}
define i1 @test() nounwind {
entry:
- %tmp = load i1 ()** @funcPtr
+ %tmp = load i1 ()*, i1 ()** @funcPtr
%eq = icmp eq i1 ()* %tmp, @test
ret i1 %eq
}
diff --git a/test/ExecutionEngine/test-arith.ll b/test/ExecutionEngine/OrcMCJIT/test-arith.ll
index 79f989f7265b..c4331bf73272 100644
--- a/test/ExecutionEngine/test-arith.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-arith.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
%A = add i8 0, 12 ; <i8> [#uses=1]
diff --git a/test/ExecutionEngine/test-branch.ll b/test/ExecutionEngine/OrcMCJIT/test-branch.ll
index 3ae55d069b3d..b3ef86a193ef 100644
--- a/test/ExecutionEngine/test-branch.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-branch.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
; test unconditional branch
define i32 @main() {
diff --git a/test/ExecutionEngine/test-call-no-external-funcs.ll b/test/ExecutionEngine/OrcMCJIT/test-call-no-external-funcs.ll
index c3cb93121f6b..78c6a1bb2f9f 100644
--- a/test/ExecutionEngine/test-call-no-external-funcs.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-call-no-external-funcs.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @_Z14func_exit_codev() nounwind uwtable {
entry:
diff --git a/test/ExecutionEngine/test-call.ll b/test/ExecutionEngine/OrcMCJIT/test-call.ll
index 313a6c52367d..5345856f5658 100644
--- a/test/ExecutionEngine/test-call.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-call.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
declare void @exit(i32)
diff --git a/test/ExecutionEngine/test-cast.ll b/test/ExecutionEngine/OrcMCJIT/test-cast.ll
index 667fa80a4897..f1a521f3b626 100644
--- a/test/ExecutionEngine/test-cast.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-cast.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @foo() {
ret i32 0
diff --git a/test/ExecutionEngine/OrcMCJIT/test-common-symbols-alignment.ll b/test/ExecutionEngine/OrcMCJIT/test-common-symbols-alignment.ll
new file mode 100644
index 000000000000..cfbd2761a37f
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/test-common-symbols-alignment.ll
@@ -0,0 +1,32 @@
+; RUN: %lli -jit-kind=orc-mcjit -O0 %s
+
+; This test checks that common symbols have been allocated addresses honouring
+; the alignment requirement.
+
+@CS1 = common global i32 0, align 16
+@CS2 = common global i8 0, align 1
+@CS3 = common global i32 0, align 16
+
+define i32 @main() nounwind {
+entry:
+ %retval = alloca i32, align 4
+ %ptr = alloca i32, align 4
+ store i32 0, i32* %retval
+ store i32 ptrtoint (i32* @CS3 to i32), i32* %ptr, align 4
+ %0 = load i32, i32* %ptr, align 4
+ %and = and i32 %0, 15
+ %tobool = icmp ne i32 %and, 0
+ br i1 %tobool, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ store i32 1, i32* %retval
+ br label %return
+
+if.else: ; preds = %entry
+ store i32 0, i32* %retval
+ br label %return
+
+return: ; preds = %if.else, %if.then
+ %1 = load i32, i32* %retval
+ ret i32 %1
+}
diff --git a/test/ExecutionEngine/test-common-symbols.ll b/test/ExecutionEngine/OrcMCJIT/test-common-symbols.ll
index 19e2ce584689..db3c0471a8e8 100644
--- a/test/ExecutionEngine/test-common-symbols.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-common-symbols.ll
@@ -1,4 +1,4 @@
-; RUN: %lli -O0 -disable-lazy-compilation=false %s
+; RUN: %lli -jit-kind=orc-mcjit -O0 -disable-lazy-compilation=false %s
; The intention of this test is to verify that symbols mapped to COMMON in ELF
; work as expected.
@@ -31,20 +31,20 @@ entry:
%retval = alloca i32, align 4
%i = alloca i32, align 4
store i32 0, i32* %retval
- %0 = load i32* @zero_int, align 4
+ %0 = load i32, i32* @zero_int, align 4
%add = add nsw i32 %0, 5
%idxprom = sext i32 %add to i64
- %arrayidx = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
store i32 40, i32* %arrayidx, align 4
- %1 = load double* @zero_double, align 8
+ %1 = load double, double* @zero_double, align 8
%cmp = fcmp olt double %1, 1.000000e+00
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
- %2 = load i32* @zero_int, align 4
+ %2 = load i32, i32* @zero_int, align 4
%add1 = add nsw i32 %2, 2
%idxprom2 = sext i32 %add1 to i64
- %arrayidx3 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
+ %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
store i32 70, i32* %arrayidx3, align 4
br label %if.end
@@ -53,35 +53,35 @@ if.end: ; preds = %if.then, %entry
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
- %3 = load i32* %i, align 4
+ %3 = load i32, i32* %i, align 4
%cmp4 = icmp slt i32 %3, 10
br i1 %cmp4, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %4 = load i32* %i, align 4
+ %4 = load i32, i32* %i, align 4
%sub = sub nsw i32 %4, 1
%idxprom5 = sext i32 %sub to i64
- %arrayidx6 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
- %5 = load i32* %arrayidx6, align 4
- %6 = load i32* %i, align 4
+ %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
+ %5 = load i32, i32* %arrayidx6, align 4
+ %6 = load i32, i32* %i, align 4
%idxprom7 = sext i32 %6 to i64
- %arrayidx8 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
- %7 = load i32* %arrayidx8, align 4
+ %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
+ %7 = load i32, i32* %arrayidx8, align 4
%add9 = add nsw i32 %5, %7
- %8 = load i32* %i, align 4
+ %8 = load i32, i32* %i, align 4
%idxprom10 = sext i32 %8 to i64
- %arrayidx11 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
+ %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
store i32 %add9, i32* %arrayidx11, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %9 = load i32* %i, align 4
+ %9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %10 = load i32* getelementptr inbounds ([10 x i32]* @zero_arr, i32 0, i64 9), align 4
+ %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
%cmp12 = icmp eq i32 %10, 110
%cond = select i1 %cmp12, i32 0, i32 -1
ret i32 %cond
diff --git a/test/ExecutionEngine/test-constantexpr.ll b/test/ExecutionEngine/OrcMCJIT/test-constantexpr.ll
index d01479a86cdc..9a147c2fc1a7 100644
--- a/test/ExecutionEngine/test-constantexpr.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-constantexpr.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
; This tests to make sure that we can evaluate weird constant expressions
diff --git a/test/ExecutionEngine/OrcMCJIT/test-data-align.ll b/test/ExecutionEngine/OrcMCJIT/test-data-align.ll
new file mode 100644
index 000000000000..f0deb56d52d6
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/test-data-align.ll
@@ -0,0 +1,15 @@
+; RUN: %lli -jit-kind=orc-mcjit -O0 %s
+
+; Check that a variable is always aligned as specified.
+
+@var = global i32 0, align 32
+define i32 @main() {
+ %addr = ptrtoint i32* @var to i64
+ %mask = and i64 %addr, 31
+ %tst = icmp eq i64 %mask, 0
+ br i1 %tst, label %good, label %bad
+good:
+ ret i32 0
+bad:
+ ret i32 1
+}
diff --git a/test/ExecutionEngine/test-fp-no-external-funcs.ll b/test/ExecutionEngine/OrcMCJIT/test-fp-no-external-funcs.ll
index 61b12c2abeb7..2baadcde4b1e 100644
--- a/test/ExecutionEngine/test-fp-no-external-funcs.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-fp-no-external-funcs.ll
@@ -1,7 +1,7 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define double @test(double* %DP, double %Arg) {
- %D = load double* %DP ; <double> [#uses=1]
+ %D = load double, double* %DP ; <double> [#uses=1]
%V = fadd double %D, 1.000000e+00 ; <double> [#uses=2]
%W = fsub double %V, %V ; <double> [#uses=3]
%X = fmul double %W, %W ; <double> [#uses=2]
diff --git a/test/ExecutionEngine/test-fp.ll b/test/ExecutionEngine/OrcMCJIT/test-fp.ll
index 2bf0210d8b00..6d56e69a9972 100644
--- a/test/ExecutionEngine/test-fp.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-fp.ll
@@ -1,7 +1,7 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define double @test(double* %DP, double %Arg) {
- %D = load double* %DP ; <double> [#uses=1]
+ %D = load double, double* %DP ; <double> [#uses=1]
%V = fadd double %D, 1.000000e+00 ; <double> [#uses=2]
%W = fsub double %V, %V ; <double> [#uses=3]
%X = fmul double %W, %W ; <double> [#uses=2]
diff --git a/test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll b/test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll
new file mode 100644
index 000000000000..d66efc27fb41
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll
@@ -0,0 +1,22 @@
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
+; XFAIL: darwin
+@var = global i32 1, align 4
+@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @ctor_func }]
+@llvm.global_dtors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @dtor_func }]
+
+define i32 @main() nounwind {
+entry:
+ %0 = load i32, i32* @var, align 4
+ ret i32 %0
+}
+
+define internal void @ctor_func() section ".text.startup" {
+entry:
+ store i32 0, i32* @var, align 4
+ ret void
+}
+
+define internal void @dtor_func() section ".text.startup" {
+entry:
+ ret void
+}
diff --git a/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
new file mode 100644
index 000000000000..7f66aec77078
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
@@ -0,0 +1,35 @@
+; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=small %s > /dev/null
+; XFAIL: mips, aarch64, arm, i686, i386
+
+@count = global i32 1, align 4
+
+define i32 @main() nounwind uwtable {
+entry:
+ %retval = alloca i32, align 4
+ %i = alloca i32, align 4
+ store i32 0, i32* %retval
+ store i32 0, i32* %i, align 4
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %entry
+ %0 = load i32, i32* %i, align 4
+ %cmp = icmp slt i32 %0, 49
+ br i1 %cmp, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ %1 = load i32, i32* @count, align 4
+ %inc = add nsw i32 %1, 1
+ store i32 %inc, i32* @count, align 4
+ br label %for.inc
+
+for.inc: ; preds = %for.body
+ %2 = load i32, i32* %i, align 4
+ %inc1 = add nsw i32 %2, 1
+ store i32 %inc1, i32* %i, align 4
+ br label %for.cond
+
+for.end: ; preds = %for.cond
+ %3 = load i32, i32* @count, align 4
+ %sub = sub nsw i32 %3, 50
+ ret i32 %sub
+}
diff --git a/test/ExecutionEngine/test-global-init-nonzero.ll b/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero.ll
index 749a4851c5d6..f8d43bffb8bd 100644
--- a/test/ExecutionEngine/test-global-init-nonzero.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
@count = global i32 1, align 4
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 49
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/test-global.ll b/test/ExecutionEngine/OrcMCJIT/test-global.ll
index 69e545555649..3e42caee12ca 100644
--- a/test/ExecutionEngine/test-global.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-global.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
@count = global i32 0, align 4
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 50
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* @count, align 4
+ %1 = load i32, i32* @count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* @count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* @count, align 4
+ %3 = load i32, i32* @count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/test-loadstore.ll b/test/ExecutionEngine/OrcMCJIT/test-loadstore.ll
index 1797599a9d8d..d95d61a067ff 100644
--- a/test/ExecutionEngine/test-loadstore.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-loadstore.ll
@@ -1,13 +1,13 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) {
- %V = load i8* %P ; <i8> [#uses=1]
+ %V = load i8, i8* %P ; <i8> [#uses=1]
store i8 %V, i8* %P
- %V.upgrd.4 = load i16* %P.upgrd.1 ; <i16> [#uses=1]
+ %V.upgrd.4 = load i16, i16* %P.upgrd.1 ; <i16> [#uses=1]
store i16 %V.upgrd.4, i16* %P.upgrd.1
- %V.upgrd.5 = load i32* %P.upgrd.2 ; <i32> [#uses=1]
+ %V.upgrd.5 = load i32, i32* %P.upgrd.2 ; <i32> [#uses=1]
store i32 %V.upgrd.5, i32* %P.upgrd.2
- %V.upgrd.6 = load i64* %P.upgrd.3 ; <i64> [#uses=1]
+ %V.upgrd.6 = load i64, i64* %P.upgrd.3 ; <i64> [#uses=1]
store i64 %V.upgrd.6, i64* %P.upgrd.3
ret void
}
@@ -16,7 +16,7 @@ define i32 @varalloca(i32 %Size) {
;; Variable sized alloca
%X = alloca i32, i32 %Size ; <i32*> [#uses=2]
store i32 %Size, i32* %X
- %Y = load i32* %X ; <i32> [#uses=1]
+ %Y = load i32, i32* %X ; <i32> [#uses=1]
ret i32 %Y
}
diff --git a/test/ExecutionEngine/test-local.ll b/test/ExecutionEngine/OrcMCJIT/test-local.ll
index ec5ba165408f..1e63d9f231fd 100644
--- a/test/ExecutionEngine/test-local.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-local.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() nounwind uwtable {
entry:
@@ -11,24 +11,24 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 50
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %1 = load i32* %count, align 4
+ %1 = load i32, i32* %count, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* %count, align 4
br label %for.inc
for.inc: ; preds = %for.body
- %2 = load i32* %i, align 4
+ %2 = load i32, i32* %i, align 4
%inc1 = add nsw i32 %2, 1
store i32 %inc1, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
- %3 = load i32* %count, align 4
+ %3 = load i32, i32* %count, align 4
%sub = sub nsw i32 %3, 50
ret i32 %sub
}
diff --git a/test/ExecutionEngine/test-logical.ll b/test/ExecutionEngine/OrcMCJIT/test-logical.ll
index 05b381bb53c2..9d53ac96e2fe 100644
--- a/test/ExecutionEngine/test-logical.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-logical.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
%A = and i8 4, 8 ; <i8> [#uses=2]
diff --git a/test/ExecutionEngine/test-loop.ll b/test/ExecutionEngine/OrcMCJIT/test-loop.ll
index e951a14ed2e9..dfb62d355e08 100644
--- a/test/ExecutionEngine/test-loop.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-loop.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
; <label>:0
diff --git a/test/ExecutionEngine/test-phi.ll b/test/ExecutionEngine/OrcMCJIT/test-phi.ll
index c5bdfd513edc..70bf8c82d448 100644
--- a/test/ExecutionEngine/test-phi.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-phi.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
; test phi node
@Y = global i32 6 ; <i32*> [#uses=1]
diff --git a/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
new file mode 100644
index 000000000000..6e0a425623b7
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
@@ -0,0 +1,17 @@
+; RUN: %lli -jit-kind=orc-mcjit -O0 -relocation-model=pic -code-model=small %s
+; XFAIL: mips, aarch64, arm, i686, i386
+
+@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+entry:
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
+ %cmp = icmp eq i8* %0, %1
+ %. = zext i1 %cmp to i32
+ ret i32 %.
+}
+
diff --git a/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc.ll b/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc.ll
new file mode 100644
index 000000000000..a3846aa26e49
--- /dev/null
+++ b/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc.ll
@@ -0,0 +1,16 @@
+; RUN: %lli -jit-kind=orc-mcjit -O0 %s
+
+@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
+@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
+@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+entry:
+ %0 = load i8*, i8** @ptr, align 4
+ %1 = load i8*, i8** @ptr2, align 4
+ %cmp = icmp eq i8* %0, %1
+ %. = zext i1 %cmp to i32
+ ret i32 %.
+}
+
diff --git a/test/ExecutionEngine/test-ret.ll b/test/ExecutionEngine/OrcMCJIT/test-ret.ll
index 025f53e5cb9e..000bea02e97c 100644
--- a/test/ExecutionEngine/test-ret.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-ret.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
; test return instructions
define void @test1() {
diff --git a/test/ExecutionEngine/test-return.ll b/test/ExecutionEngine/OrcMCJIT/test-return.ll
index d464a4b72d80..f7a1cdda0705 100644
--- a/test/ExecutionEngine/test-return.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-return.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() nounwind uwtable {
entry:
diff --git a/test/ExecutionEngine/test-setcond-fp.ll b/test/ExecutionEngine/OrcMCJIT/test-setcond-fp.ll
index 68276e617a4a..8514c8df820f 100644
--- a/test/ExecutionEngine/test-setcond-fp.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-setcond-fp.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
diff --git a/test/ExecutionEngine/test-setcond-int.ll b/test/ExecutionEngine/OrcMCJIT/test-setcond-int.ll
index 48dc02198ec0..2f63d0bbef37 100644
--- a/test/ExecutionEngine/test-setcond-int.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-setcond-int.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
%int1 = add i32 0, 0 ; <i32> [#uses=6]
diff --git a/test/ExecutionEngine/test-shift.ll b/test/ExecutionEngine/OrcMCJIT/test-shift.ll
index 590e2620689f..2d064211cf54 100644
--- a/test/ExecutionEngine/test-shift.ll
+++ b/test/ExecutionEngine/OrcMCJIT/test-shift.ll
@@ -1,4 +1,4 @@
-; RUN: %lli %s > /dev/null
+; RUN: %lli -jit-kind=orc-mcjit %s > /dev/null
define i32 @main() {
%shamt = add i8 0, 1 ; <i8> [#uses=8]
diff --git a/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64 b/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64
new file mode 100644
index 000000000000..7029cf437c5e
--- /dev/null
+++ b/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64
@@ -0,0 +1,31 @@
+# RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj -o %T/COFF_x86_64.o %s
+# RUN: llvm-rtdyld -triple=x86_64-pc-win32 -verify -check=%s %/T/COFF_x86_64.o
+ .text
+ .def F;
+ .scl 2;
+ .type 32;
+ .endef
+ .globl __real400921f9f01b866e
+ .section .rdata,"dr",discard,__real400921f9f01b866e
+ .align 8
+__real400921f9f01b866e:
+ .quad 4614256650576692846 # double 3.1415899999999999
+ .text
+ .globl F
+ .global inst1
+ .align 16, 0x90
+F: # @F
+.Ltmp0:
+.seh_proc F
+# BB#0: # %entry
+.Ltmp1:
+ .seh_endprologue
+# rtdyld-check: decode_operand(inst1, 4) = __real400921f9f01b866e - next_pc(inst1)
+inst1:
+ movsd __real400921f9f01b866e(%rip), %xmm0 # xmm0 = mem[0],zero
+ retq
+.Leh_func_end0:
+.Ltmp2:
+ .seh_endproc
+
+
diff --git a/test/ExecutionEngine/RuntimeDyld/X86/ELF_x64-64_PIC_relocations.s b/test/ExecutionEngine/RuntimeDyld/X86/ELF_x64-64_PIC_relocations.s
new file mode 100644
index 000000000000..75989671a204
--- /dev/null
+++ b/test/ExecutionEngine/RuntimeDyld/X86/ELF_x64-64_PIC_relocations.s
@@ -0,0 +1,31 @@
+# RUN: llvm-mc -triple=x86_64-pc-linux -relocation-model=pic -filetype=obj -o %T/test_ELF1_x86-64.o %s
+# RUN: llvm-mc -triple=x86_64-pc-linux -relocation-model=pic -filetype=obj -o %T/test_ELF2_x86-64.o %s
+# RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -filetype=obj -o %T/test_ELF_ExternalGlobal_x86-64.o %S/Inputs/ExternalGlobal.ll
+# RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify %T/test_ELF1_x86-64.o %T/test_ELF_ExternalGlobal_x86-64.o
+# Test that we can load this code twice at memory locations more than 2GB apart
+# RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify -map-section test_ELF1_x86-64.o,.got=0x10000 -map-section test_ELF2_x86-64.o,.text=0x100000000 -map-section test_ELF2_x86-64.o,.got=0x100010000 %T/test_ELF1_x86-64.o %T/test_ELF2_x86-64.o %T/test_ELF_ExternalGlobal_x86-64.o
+
+# Assembly obtained by compiling the following and adding checks:
+# @G = external global i8*
+#
+# define i8* @foo() {
+# %ret = load i8** @G
+# ret i32 %ret
+# }
+#
+
+#
+ .text
+ .file "ELF_x64-64_PIC_relocations.ll"
+ .align 16, 0x90
+ .type foo,@function
+foo: # @foo
+# BB#0:
+ movq G@GOTPCREL(%rip), %rax
+ movl (%rax), %eax
+ retq
+.Ltmp0:
+ .size foo, .Ltmp0-foo
+
+
+ .section ".note.GNU-stack","",@progbits
diff --git a/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll b/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll
new file mode 100644
index 000000000000..51002aa37bb0
--- /dev/null
+++ b/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll
@@ -0,0 +1,2 @@
+@F = global i8 0
+@G = global i8* @F
diff --git a/test/ExecutionEngine/fma3-jit.ll b/test/ExecutionEngine/fma3-jit.ll
index 25eaa65a538b..b68b7aeb6e4f 100644
--- a/test/ExecutionEngine/fma3-jit.ll
+++ b/test/ExecutionEngine/fma3-jit.ll
@@ -9,8 +9,8 @@ declare i32 @printf(i8*, ...)
define i32 @main() {
%fma = tail call double @llvm.fma.f64(double 3.0, double 3.0, double 3.0) nounwind readnone
- %ptr1 = getelementptr [4 x i8]* @msg_double, i32 0, i32 0
- call i32 (i8*,...)* @printf(i8* %ptr1, double %fma)
+ %ptr1 = getelementptr [4 x i8], [4 x i8]* @msg_double, i32 0, i32 0
+ call i32 (i8*,...) @printf(i8* %ptr1, double %fma)
ret i32 0
}
diff --git a/test/ExecutionEngine/frem.ll b/test/ExecutionEngine/frem.ll
index 7e0b6060f6fe..aedaae38baac 100644
--- a/test/ExecutionEngine/frem.ll
+++ b/test/ExecutionEngine/frem.ll
@@ -8,12 +8,14 @@
@str = internal constant [18 x i8] c"Double value: %f\0A\00"
declare i32 @printf(i8* nocapture, ...) nounwind
+declare i32 @fflush(i8*) nounwind
define i32 @main() {
- %flt = load float* @flt
+ %flt = load float, float* @flt
%float2 = frem float %flt, 5.0
%double1 = fpext float %float2 to double
- call i32 (i8*, ...)* @printf(i8* getelementptr ([18 x i8]* @str, i32 0, i64 0), double %double1)
+ call i32 (i8*, ...) @printf(i8* getelementptr ([18 x i8], [18 x i8]* @str, i32 0, i64 0), double %double1)
+ call i32 @fflush(i8* null)
ret i32 0
}
diff --git a/test/ExecutionEngine/hello.ll b/test/ExecutionEngine/hello.ll
deleted file mode 100644
index 47e36a589563..000000000000
--- a/test/ExecutionEngine/hello.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: %lli %s > /dev/null
-
-@.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1]
-
-declare i32 @puts(i8*)
-
-define i32 @main() {
- %reg210 = call i32 @puts( i8* getelementptr ([12 x i8]* @.LC0, i64 0, i64 0) ) ; <i32> [#uses=0]
- ret i32 0
-}
-
diff --git a/test/ExecutionEngine/simplesttest.ll b/test/ExecutionEngine/simplesttest.ll
deleted file mode 100644
index 85c171532752..000000000000
--- a/test/ExecutionEngine/simplesttest.ll
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: %lli %s > /dev/null
-
-define i32 @main() {
- ret i32 0
-}
-
diff --git a/test/ExecutionEngine/test-interp-vec-loadstore.ll b/test/ExecutionEngine/test-interp-vec-loadstore.ll
index 665a135d6bc9..b66a93505643 100644
--- a/test/ExecutionEngine/test-interp-vec-loadstore.ll
+++ b/test/ExecutionEngine/test-interp-vec-loadstore.ll
@@ -35,13 +35,13 @@ define i32 @main() {
store i32 4, i32* %pint_3
; load stored scalars
- %val_int0 = load i32* %pint_0
- %val_int1 = load i32* %pint_1
- %val_int2 = load i32* %pint_2
- %val_int3 = load i32* %pint_3
+ %val_int0 = load i32, i32* %pint_0
+ %val_int1 = load i32, i32* %pint_1
+ %val_int2 = load i32, i32* %pint_2
+ %val_int3 = load i32, i32* %pint_3
; load stored vector
- %val0 = load <4 x i32> *%a, align 16
+ %val0 = load <4 x i32> , <4 x i32> *%a, align 16
; extract integers from the loaded vector
%res_i32_0 = extractelement <4 x i32> %val0, i32 0
@@ -72,8 +72,8 @@ define i32 @main() {
; if TRUE print message
br i1 %res_i, label %Print_int, label %Double
Print_int:
- %ptr0 = getelementptr [17 x i8]* @msg_int, i32 0, i32 0
- call i32 (i8*,...)* @printf(i8* %ptr0)
+ %ptr0 = getelementptr [17 x i8], [17 x i8]* @msg_int, i32 0, i32 0
+ call i32 (i8*,...) @printf(i8* %ptr0)
br label %Double
Double:
store <4 x double> <double 5.0, double 6.0, double 7.0, double 8.0>, <4 x double>* %b, align 16
@@ -84,12 +84,12 @@ Double:
store double 8.0, double* %pdouble_3
; load stored vector
- %val1 = load <4 x double> *%b, align 16
+ %val1 = load <4 x double> , <4 x double> *%b, align 16
; load stored scalars
- %val_double0 = load double* %pdouble_0
- %val_double1 = load double* %pdouble_1
- %val_double2 = load double* %pdouble_2
- %val_double3 = load double* %pdouble_3
+ %val_double0 = load double, double* %pdouble_0
+ %val_double1 = load double, double* %pdouble_1
+ %val_double2 = load double, double* %pdouble_2
+ %val_double3 = load double, double* %pdouble_3
%res_double_0 = extractelement <4 x double> %val1, i32 0
%res_double_1 = extractelement <4 x double> %val1, i32 1
@@ -116,8 +116,8 @@ Double:
br i1 %res_double, label %Print_double, label %Float
Print_double:
- %ptr1 = getelementptr [20 x i8]* @msg_double, i32 0, i32 0
- call i32 (i8*,...)* @printf(i8* %ptr1)
+ %ptr1 = getelementptr [20 x i8], [20 x i8]* @msg_double, i32 0, i32 0
+ call i32 (i8*,...) @printf(i8* %ptr1)
br label %Float
Float:
store <4 x float> <float 9.0, float 10.0, float 11.0, float 12.0>, <4 x float>* %c, align 16
@@ -128,12 +128,12 @@ Float:
store float 12.0, float* %pfloat_3
; load stored vector
- %val2 = load <4 x float> *%c, align 16
+ %val2 = load <4 x float> , <4 x float> *%c, align 16
; load stored scalars
- %val_float0 = load float* %pfloat_0
- %val_float1 = load float* %pfloat_1
- %val_float2 = load float* %pfloat_2
- %val_float3 = load float* %pfloat_3
+ %val_float0 = load float, float* %pfloat_0
+ %val_float1 = load float, float* %pfloat_1
+ %val_float2 = load float, float* %pfloat_2
+ %val_float3 = load float, float* %pfloat_3
%res_float_0 = extractelement <4 x float> %val2, i32 0
%res_float_1 = extractelement <4 x float> %val2, i32 1
@@ -160,8 +160,8 @@ Float:
br i1 %res_float, label %Print_float, label %Exit
Print_float:
- %ptr2 = getelementptr [19 x i8]* @msg_float, i32 0, i32 0
- call i32 (i8*,...)* @printf(i8* %ptr2)
+ %ptr2 = getelementptr [19 x i8], [19 x i8]* @msg_float, i32 0, i32 0
+ call i32 (i8*,...) @printf(i8* %ptr2)
br label %Exit
Exit: