aboutsummaryrefslogtreecommitdiff
path: root/test/ExecutionEngine
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-03-10 07:21:50 +0000
committerTanya Lattner <tonic@nondot.org>2008-03-10 07:21:50 +0000
commitceca194c4355224723b309a3a27c5e5bc19cb6fc (patch)
treed976e8cf9d933c32868d72a94d1ec2d9d7205735 /test/ExecutionEngine
parentf79e60649a5edea03bdccf8521d77c15cbb33af4 (diff)
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine')
-rw-r--r--test/ExecutionEngine/2002-12-16-ArgTest.ll63
-rw-r--r--test/ExecutionEngine/2003-01-04-ArgumentBug.ll20
-rw-r--r--test/ExecutionEngine/2003-01-04-LoopTest.ll32
-rw-r--r--test/ExecutionEngine/2003-01-04-PhiTest.ll16
-rw-r--r--test/ExecutionEngine/2003-01-09-SARTest.ll13
-rw-r--r--test/ExecutionEngine/2003-01-10-FUCOM.ll16
-rw-r--r--test/ExecutionEngine/2003-01-15-AlignmentTest.ll27
-rw-r--r--test/ExecutionEngine/2003-05-06-LivenessClobber.llx23
-rw-r--r--test/ExecutionEngine/2003-05-07-ArgumentTest.llx16
-rw-r--r--test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll20
-rw-r--r--test/ExecutionEngine/2003-06-04-bzip2-bug.ll26
-rw-r--r--test/ExecutionEngine/2003-06-05-PHIBug.ll21
-rw-r--r--test/ExecutionEngine/2003-08-15-AllocaAssertion.ll12
-rw-r--r--test/ExecutionEngine/2003-08-21-EnvironmentTest.ll17
-rw-r--r--test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll54
-rw-r--r--test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll42
-rw-r--r--test/ExecutionEngine/2005-12-02-TailCallBug.ll32
-rw-r--r--test/ExecutionEngine/hello.ll14
-rw-r--r--test/ExecutionEngine/hello2.ll24
-rw-r--r--test/ExecutionEngine/simplesttest.ll9
-rw-r--r--test/ExecutionEngine/simpletest.ll14
-rw-r--r--test/ExecutionEngine/test-arith.ll67
-rw-r--r--test/ExecutionEngine/test-branch.ll15
-rw-r--r--test/ExecutionEngine/test-call.ll26
-rw-r--r--test/ExecutionEngine/test-cast.ll236
-rw-r--r--test/ExecutionEngine/test-constantexpr.ll13
-rw-r--r--test/ExecutionEngine/test-fp.ll34
-rw-r--r--test/ExecutionEngine/test-loadstore.ll53
-rw-r--r--test/ExecutionEngine/test-logical.ll36
-rw-r--r--test/ExecutionEngine/test-loop.ll20
-rw-r--r--test/ExecutionEngine/test-malloc.ll22
-rw-r--r--test/ExecutionEngine/test-phi.ll39
-rw-r--r--test/ExecutionEngine/test-ret.ll55
-rw-r--r--test/ExecutionEngine/test-setcond-fp.ll40
-rw-r--r--test/ExecutionEngine/test-setcond-int.ll135
-rw-r--r--test/ExecutionEngine/test-shift.ll67
36 files changed, 663 insertions, 706 deletions
diff --git a/test/ExecutionEngine/2002-12-16-ArgTest.ll b/test/ExecutionEngine/2002-12-16-ArgTest.ll
index 4ef1439d71..6a8d100e67 100644
--- a/test/ExecutionEngine/2002-12-16-ArgTest.ll
+++ b/test/ExecutionEngine/2002-12-16-ArgTest.ll
@@ -1,47 +1,38 @@
-; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-%.LC0 = internal global [10 x sbyte] c"argc: %d\0A\00"
+@.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1]
-implementation ; Functions:
+declare i32 @puts(i8*)
-declare int %puts(sbyte*)
-
-void %getoptions(int* %argc) {
-bb0: ; No predecessors!
+define void @getoptions(i32* %argc) {
+bb0:
ret void
}
-declare int %printf(sbyte*, ...)
-
-int %main(int %argc, sbyte** %argv) {
-bb0: ; No predecessors!
- call int (sbyte*, ...)* %printf( sbyte* getelementptr ([10 x sbyte]* %.LC0, long 0, long 0), int %argc)
- %cast224 = cast sbyte** %argv to sbyte* ; <sbyte*> [#uses=1]
- %local = alloca sbyte* ; <sbyte**> [#uses=3]
- store sbyte* %cast224, sbyte** %local
- %cond226 = setle int %argc, 0 ; <bool> [#uses=1]
- br bool %cond226, label %bb3, label %bb2
+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]
+ %cast224 = bitcast i8** %argv to i8* ; <i8*> [#uses=1]
+ %local = alloca i8* ; <i8**> [#uses=3]
+ store i8* %cast224, i8** %local
+ %cond226 = icmp sle i32 %argc, 0 ; <i1> [#uses=1]
+ br i1 %cond226, label %bb3, label %bb2
bb2: ; preds = %bb2, %bb0
- %cann-indvar = phi int [ 0, %bb0 ], [ %add1-indvar, %bb2 ] ; <int> [#uses=2]
- %add1-indvar = add int %cann-indvar, 1 ; <int> [#uses=2]
- %cann-indvar-idxcast = cast int %cann-indvar to long ; <long> [#uses=1]
- ;%reg115 = load sbyte** %local ; <sbyte*> [#uses=1]
- ;%cann-indvar-idxcast-scale = mul long %cann-indvar-idxcast, 8 ; <long> [#uses=1]
- ;%reg232 = getelementptr sbyte* %reg115, long %cann-indvar-idxcast-scale ; <sbyte*> [#uses=1]
- ;%cast235 = cast sbyte* %reg232 to sbyte** ; <sbyte**> [#uses=1]
- %CT = cast sbyte** %local to sbyte***
- %reg115 = load sbyte*** %CT
- %cast235 = getelementptr sbyte** %reg115, long %cann-indvar-idxcast
-
- %reg117 = load sbyte** %cast235 ; <sbyte*> [#uses=1]
- %reg236 = call int %puts( sbyte* %reg117 ) ; <int> [#uses=0]
- %cond239 = setlt int %add1-indvar, %argc ; <bool> [#uses=1]
- br bool %cond239, label %bb2, label %bb3
-
+ %cann-indvar = phi i32 [ 0, %bb0 ], [ %add1-indvar, %bb2 ] ; <i32> [#uses=2]
+ %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]
+ %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
bb3: ; preds = %bb2, %bb0
- %cast243 = cast sbyte** %local to int* ; <int*> [#uses=1]
- call void %getoptions( int* %cast243 )
- ret int 0
+ %cast243 = bitcast i8** %local to i32* ; <i32*> [#uses=1]
+ call void @getoptions( i32* %cast243 )
+ ret i32 0
}
diff --git a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll b/test/ExecutionEngine/2003-01-04-ArgumentBug.ll
index 218154f8cf..6a8f07bad5 100644
--- a/test/ExecutionEngine/2003-01-04-ArgumentBug.ll
+++ b/test/ExecutionEngine/2003-01-04-ArgumentBug.ll
@@ -1,16 +1,14 @@
-; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-
-implementation ; Functions:
-
-int %foo(int %X, int %Y, double %A) {
- %cond212 = setne double %A, 1.000000e+00 ; <bool> [#uses=1]
- %cast110 = cast bool %cond212 to int ; <int> [#uses=1]
- ret int %cast110
+define i32 @foo(i32 %X, i32 %Y, double %A) {
+ %cond212 = fcmp une double %A, 1.000000e+00 ; <i1> [#uses=1]
+ %cast110 = zext i1 %cond212 to i32 ; <i32> [#uses=1]
+ ret i32 %cast110
}
-int %main() {
- %reg212 = call int %foo( int 0, int 1, double 1.000000e+00 ) ; <int> [#uses=1]
- ret int %reg212
+define i32 @main() {
+ %reg212 = call i32 @foo( i32 0, i32 1, double 1.000000e+00 ) ; <i32> [#uses=1]
+ ret i32 %reg212
}
+
diff --git a/test/ExecutionEngine/2003-01-04-LoopTest.ll b/test/ExecutionEngine/2003-01-04-LoopTest.ll
index f70928aef8..fce0b00a04 100644
--- a/test/ExecutionEngine/2003-01-04-LoopTest.ll
+++ b/test/ExecutionEngine/2003-01-04-LoopTest.ll
@@ -1,25 +1,21 @@
-; RUN: llvm-upgrade < %s | llvm-as -o %t.bc -f
+; RUN: llvm-as < %s -o %t.bc -f
; RUN: lli %t.bc > /dev/null
-implementation
-
-int %main() {
- call int %mylog(int 4)
- ret int 0
+define i32 @main() {
+ call i32 @mylog( i32 4 ) ; <i32>:1 [#uses=0]
+ ret i32 0
}
-internal int %mylog(int %num) {
-bb0: ; No predecessors!
+define internal i32 @mylog(i32 %num) {
+bb0:
br label %bb2
-
-bb2:
- %reg112 = phi int [ 10, %bb2 ], [ 1, %bb0 ]
- %cann-indvar = phi int [ %cann-indvar, %bb2 ], [0, %bb0]
- %reg114 = add int %reg112, 1
- %cond222 = setlt int %reg114, %num
- br bool %cond222, label %bb2, label %bb3
-
-bb3: ; preds = %bb2, %bb0
- ret int %reg114
+bb2: ; preds = %bb2, %bb0
+ %reg112 = phi i32 [ 10, %bb2 ], [ 1, %bb0 ] ; <i32> [#uses=1]
+ %cann-indvar = phi i32 [ %cann-indvar, %bb2 ], [ 0, %bb0 ] ; <i32> [#uses=1]
+ %reg114 = add i32 %reg112, 1 ; <i32> [#uses=2]
+ %cond222 = icmp slt i32 %reg114, %num ; <i1> [#uses=1]
+ br i1 %cond222, label %bb2, label %bb3
+bb3: ; preds = %bb2
+ ret i32 %reg114
}
diff --git a/test/ExecutionEngine/2003-01-04-PhiTest.ll b/test/ExecutionEngine/2003-01-04-PhiTest.ll
index 45af8300a6..cadb19e777 100644
--- a/test/ExecutionEngine/2003-01-04-PhiTest.ll
+++ b/test/ExecutionEngine/2003-01-04-PhiTest.ll
@@ -1,11 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-int %main() {
+define i32 @main() {
+; <label>:0
br label %Loop
-Loop:
- %X = phi int [0, %0], [1, %Loop]
- br bool true, label %Out, label %Loop
-Out:
- ret int %X
+Loop: ; preds = %Loop, %0
+ %X = phi i32 [ 0, %0 ], [ 1, %Loop ] ; <i32> [#uses=1]
+ br i1 true, label %Out, label %Loop
+Out: ; preds = %Loop
+ ret i32 %X
}
+
diff --git a/test/ExecutionEngine/2003-01-09-SARTest.ll b/test/ExecutionEngine/2003-01-09-SARTest.ll
index 73f2900a15..eeb4326792 100644
--- a/test/ExecutionEngine/2003-01-09-SARTest.ll
+++ b/test/ExecutionEngine/2003-01-09-SARTest.ll
@@ -1,11 +1,12 @@
-; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
; We were accidentally inverting the signedness of right shifts. Whoops.
-int %main() {
- %X = shr int -1, ubyte 16
- %Y = shr int %X, ubyte 16
- %Z = add int %Y, 1
- ret int %Z
+define i32 @main() {
+ %X = ashr i32 -1, 16 ; <i32> [#uses=1]
+ %Y = ashr i32 %X, 16 ; <i32> [#uses=1]
+ %Z = add i32 %Y, 1 ; <i32> [#uses=1]
+ ret i32 %Z
}
+
diff --git a/test/ExecutionEngine/2003-01-10-FUCOM.ll b/test/ExecutionEngine/2003-01-10-FUCOM.ll
index 4209df9684..c45674c1bc 100644
--- a/test/ExecutionEngine/2003-01-10-FUCOM.ll
+++ b/test/ExecutionEngine/2003-01-10-FUCOM.ll
@@ -1,11 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-
-int %main() {
- %X = add double 0.0, 1.0
- %Y = sub double 0.0, 1.0
- %Z = seteq double %X, %Y
- add double %Y, 0.0
- ret int 0
+define i32 @main() {
+ %X = add double 0.000000e+00, 1.000000e+00 ; <double> [#uses=1]
+ %Y = sub double 0.000000e+00, 1.000000e+00 ; <double> [#uses=2]
+ %Z = fcmp oeq double %X, %Y ; <i1> [#uses=0]
+ add double %Y, 0.000000e+00 ; <double>:1 [#uses=0]
+ ret i32 0
}
+
diff --git a/test/ExecutionEngine/2003-01-15-AlignmentTest.ll b/test/ExecutionEngine/2003-01-15-AlignmentTest.ll
index e9ffd90c86..02872f6958 100644
--- a/test/ExecutionEngine/2003-01-15-AlignmentTest.ll
+++ b/test/ExecutionEngine/2003-01-15-AlignmentTest.ll
@@ -1,19 +1,18 @@
-; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-
-int %bar(sbyte* %X) {
- %P = alloca double ; pointer should be 4 byte aligned!
- %R = cast double* %P to int
- %A = and int %R, 3
- ret int %A
+define i32 @bar(i8* %X) {
+ ; pointer should be 4 byte aligned!
+ %P = alloca double ; <double*> [#uses=1]
+ %R = ptrtoint double* %P to i32 ; <i32> [#uses=1]
+ %A = and i32 %R, 3 ; <i32> [#uses=1]
+ ret i32 %A
}
-int %main() {
- %SP = alloca sbyte
- %X = add uint 0, 0
- alloca sbyte, uint %X
-
- call int %bar(sbyte* %SP)
- ret int %0
+define i32 @main() {
+ %SP = alloca i8 ; <i8*> [#uses=1]
+ %X = add i32 0, 0 ; <i32> [#uses=1]
+ alloca i8, i32 %X ; <i8*>:1 [#uses=0]
+ call i32 @bar( i8* %SP ) ; <i32>:2 [#uses=1]
+ ret i32 %2
}
diff --git a/test/ExecutionEngine/2003-05-06-LivenessClobber.llx b/test/ExecutionEngine/2003-05-06-LivenessClobber.llx
index ea3f14b512..57fe95b2d9 100644
--- a/test/ExecutionEngine/2003-05-06-LivenessClobber.llx
+++ b/test/ExecutionEngine/2003-05-06-LivenessClobber.llx
@@ -1,20 +1,19 @@
; This testcase shoudl return with an exit code of 1.
;
-; RUN: llvm-upgrade < %s | llvm-as | not lli
+; RUN: llvm-as < %s | not lli
-%test = global long 0
-implementation
+@test = global i64 0 ; <i64*> [#uses=1]
-
-internal long %test() {
- %tmp.0 = load long* %test ; <long> [#uses=1]
- %tmp.1 = add long %tmp.0, 1 ; <long> [#uses=1]
- ret long %tmp.1
+define internal i64 @test.upgrd.1() {
+ %tmp.0 = load i64* @test ; <i64> [#uses=1]
+ %tmp.1 = add i64 %tmp.0, 1 ; <i64> [#uses=1]
+ ret i64 %tmp.1
}
-int %main() {
- %L = call long %test()
- %I = cast long %L to int
- ret int %I
+define i32 @main() {
+ %L = call i64 @test.upgrd.1( ) ; <i64> [#uses=1]
+ %I = trunc i64 %L to i32 ; <i32> [#uses=1]
+ ret i32 %I
}
+
diff --git a/test/ExecutionEngine/2003-05-07-ArgumentTest.llx b/test/ExecutionEngine/2003-05-07-ArgumentTest.llx
index e5dd04eafb..fa15d7110c 100644
--- a/test/ExecutionEngine/2003-05-07-ArgumentTest.llx
+++ b/test/ExecutionEngine/2003-05-07-ArgumentTest.llx
@@ -1,13 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | lli - test
+; RUN: llvm-as < %s | lli - test
-implementation
+declare i32 @puts(i8*)
-declare int %puts(sbyte*)
-
-int %main(int %argc.1, sbyte** %argv.1) {
- %tmp.5 = getelementptr sbyte** %argv.1, long 1 ; <sbyte**> [#uses=1]
- %tmp.6 = load sbyte** %tmp.5 ; <sbyte*> [#uses=1]
- %tmp.0 = call int %puts( sbyte* %tmp.6 ) ; <int> [#uses=0]
- ret int 0
+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/2003-05-11-PHIRegAllocBug.ll b/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
index 1d9ba77145..850654f234 100644
--- a/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
+++ b/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
@@ -1,18 +1,16 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-target endian = little
-target pointersize = 32
+target datalayout = "e-p:32:32"
-implementation
-
-int %main() {
+define i32 @main() {
entry:
br label %endif
-then:
+then: ; No predecessors!
br label %endif
-endif:
- %x = phi uint [ 4, %entry ], [ 27, %then ]
- %result = phi int [ 32, %then ], [ 0, %entry ]
- ret int 0
+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/2003-06-04-bzip2-bug.ll b/test/ExecutionEngine/2003-06-04-bzip2-bug.ll
index cd237c326b..ff758cf14c 100644
--- a/test/ExecutionEngine/2003-06-04-bzip2-bug.ll
+++ b/test/ExecutionEngine/2003-06-04-bzip2-bug.ll
@@ -1,22 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
; Testcase distilled from 256.bzip2.
-target endian = little
-target pointersize = 32
+target datalayout = "e-p:32:32"
-int %main() {
+define i32 @main() {
entry:
br label %loopentry.0
-
-loopentry.0:
- %h.0 = phi int [ %tmp.2, %loopentry.0 ], [ -1, %entry ]
- %tmp.2 = add int %h.0, 1
- %tmp.4 = setne int %tmp.2, 0
- br bool %tmp.4, label %loopentry.0, label %loopentry.1
-
-loopentry.1:
- %h.1 = phi int [ %tmp.2, %loopentry.0 ]
- ret int %h.1
+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/2003-06-05-PHIBug.ll b/test/ExecutionEngine/2003-06-05-PHIBug.ll
index 8c1aaba27d..3a55f72c97 100644
--- a/test/ExecutionEngine/2003-06-05-PHIBug.ll
+++ b/test/ExecutionEngine/2003-06-05-PHIBug.ll
@@ -1,19 +1,18 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
; Testcase distilled from 256.bzip2.
-target endian = little
-target pointersize = 32
+target datalayout = "e-p:32:32"
-int %main() {
+define i32 @main() {
entry:
- %X = add int 1, -1
+ %X = add i32 1, -1 ; <i32> [#uses=3]
br label %Next
-
-Next:
- %A = phi int [ %X, %entry ]
- %B = phi int [ %X, %entry ]
- %C = phi int [ %X, %entry ]
- ret int %C
+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/2003-08-15-AllocaAssertion.ll
index adc82206b2..ce5e1ed3ad 100644
--- a/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
+++ b/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
@@ -1,12 +1,12 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
; This testcase failed to work because two variable sized allocas confused the
; local register allocator.
-int %main(uint %X) {
- %A = alloca uint, uint %X
-
- %B = alloca float, uint %X
- ret int 0
+define i32 @main(i32 %X) {
+ %A = alloca i32, i32 %X ; <i32*> [#uses=0]
+ %B = alloca float, i32 %X ; <float*> [#uses=0]
+ ret i32 0
}
+
diff --git a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll b/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll
index 21e87cac9e..ec36a85d7d 100644
--- a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll
+++ b/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
;
@@ -9,15 +9,14 @@
; environment to the main() function.
;
-implementation
-declare uint %strlen(sbyte*)
+declare i32 @strlen(i8*)
-int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) {
- %tmp.2 = load sbyte** %envp.1
- %tmp.3 = call uint %strlen( sbyte* %tmp.2 )
- %T = seteq uint %tmp.3, 0
- %R = cast bool %T to int
- ret int %R
+define i32 @main(i32 %argc.1, i8** %argv.1, i8** %envp.1) {
+ %tmp.2 = load 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]
+ ret i32 %R
}
diff --git a/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll b/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
index 4d1d0452db..42e8dc3b13 100644
--- a/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
+++ b/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
@@ -1,33 +1,35 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /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
; use the ESP register (which is not allocatable) to hold a value.
-int %main(uint %A) {
- %Ap2 = alloca uint, uint %A ; ESP gets used again...
- %B = add uint %A, 1 ; Produce lots of overlapping live ranges
- %C = add uint %A, 2
- %D = add uint %A, 3
- %E = add uint %A, 4
- %F = add uint %A, 5
- %G = add uint %A, 6
- %H = add uint %A, 7
- %I = add uint %A, 8
- %J = add uint %A, 9
- %K = add uint %A, 10
-
- store uint %A, uint *%Ap2 ; Uses of all of the values
- store uint %B, uint *%Ap2
- store uint %C, uint *%Ap2
- store uint %D, uint *%Ap2
- store uint %E, uint *%Ap2
- store uint %F, uint *%Ap2
- store uint %G, uint *%Ap2
- store uint %H, uint *%Ap2
- store uint %I, uint *%Ap2
- store uint %J, uint *%Ap2
- store uint %K, uint *%Ap2
- ret int 0
+define i32 @main(i32 %A) {
+ ; ESP gets used again...
+ %Ap2 = alloca i32, i32 %A ; <i32*> [#uses=11]
+ ; Produce lots of overlapping live ranges
+ %B = add i32 %A, 1 ; <i32> [#uses=1]
+ %C = add i32 %A, 2 ; <i32> [#uses=1]
+ %D = add i32 %A, 3 ; <i32> [#uses=1]
+ %E = add i32 %A, 4 ; <i32> [#uses=1]
+ %F = add i32 %A, 5 ; <i32> [#uses=1]
+ %G = add i32 %A, 6 ; <i32> [#uses=1]
+ %H = add i32 %A, 7 ; <i32> [#uses=1]
+ %I = add i32 %A, 8 ; <i32> [#uses=1]
+ %J = add i32 %A, 9 ; <i32> [#uses=1]
+ %K = add i32 %A, 10 ; <i32> [#uses=1]
+ ; Uses of all of the values
+ store i32 %A, i32* %Ap2
+ store i32 %B, i32* %Ap2
+ store i32 %C, i32* %Ap2
+ store i32 %D, i32* %Ap2
+ store i32 %E, i32* %Ap2
+ store i32 %F, i32* %Ap2
+ store i32 %G, i32* %Ap2
+ store i32 %H, i32* %Ap2
+ store i32 %I, i32* %Ap2
+ store i32 %J, i32* %Ap2
+ store i32 %K, i32* %Ap2
+ ret i32 0
}
diff --git a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll b/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
index b2700e1f39..32d99d5051 100644
--- a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
+++ b/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
@@ -1,30 +1,24 @@
-; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-%A = global int 0
+@A = global i32 0 ; <i32*> [#uses=1]
-int %main() {
- %Ret = call int %test(bool true, int 0)
- ret int %Ret
+define i32 @main() {
+ %Ret = call i32 @test( i1 true, i32 0 ) ; <i32> [#uses=1]
+ ret i32 %Ret
}
-int %test(bool %c, int %A) {
- br bool %c, label %Taken1, label %NotTaken
-
-Cont:
- %V = phi int [0, %NotTaken],
- [ sub (int cast (int* %A to int), int 1234), %Taken1]
- ret int 0
-
-NotTaken:
- br label %Cont
-
-Taken1:
- %B = seteq int %A, 0
- ; Code got inserted here, breaking the condition code.
- br bool %B, label %Cont, label %ExitError
-
-ExitError:
- ret int 12
-
+define i32 @test(i1 %c, i32 %A) {
+ br i1 %c, label %Taken1, label %NotTaken
+Cont: ; preds = %Taken1, %NotTaken
+ %V = phi i32 [ 0, %NotTaken ], [ sub (i32 ptrtoint (i32* @A to i32), i32 1234), %Taken1 ] ; <i32> [#uses=0]
+ ret i32 0
+NotTaken: ; preds = %0
+ br label %Cont
+Taken1: ; preds = %0
+ %B = icmp eq i32 %A, 0 ; <i1> [#uses=1]
+ br i1 %B, label %Cont, label %ExitError
+ExitError: ; preds = %Taken1
+ ret i32 12
}
+
diff --git a/test/ExecutionEngine/2005-12-02-TailCallBug.ll b/test/ExecutionEngine/2005-12-02-TailCallBug.ll
index 447f49e9ad..59a40ae814 100644
--- a/test/ExecutionEngine/2005-12-02-TailCallBug.ll
+++ b/test/ExecutionEngine/2005-12-02-TailCallBug.ll
@@ -1,21 +1,21 @@
; PR672
-; RUN: llvm-upgrade < %s | llvm-as | lli
+; RUN: llvm-as < %s | lli
-int %main(){
- %f = cast int (int, int*, int)* %check_tail to int*
- %res = tail call fastcc int %check_tail( int 10, int* %f,int 10)
- ret int %res
+define i32 @main() {
+ %f = bitcast i32 (i32, i32*, i32)* @check_tail to i32* ; <i32*> [#uses=1]
+ %res = tail call fastcc i32 @check_tail( i32 10, i32* %f, i32 10 ) ; <i32> [#uses=1]
+ ret i32 %res
}
-fastcc int %check_tail(int %x, int* %f, int %g) {
- %tmp1 = setgt int %x, 0
- br bool %tmp1, label %if-then, label %if-else
-if-then:
- %fun_ptr = cast int* %f to int(int, int*, int)*
- %arg1 = add int %x, -1
- %res = tail call fastcc int %fun_ptr( int %arg1, int * %f, int %g)
- ret int %res
-
-if-else:
- ret int %x
+define fastcc i32 @check_tail(i32 %x, i32* %f, i32 %g) {
+ %tmp1 = icmp sgt i32 %x, 0 ; <i1> [#uses=1]
+ br i1 %tmp1, label %if-then, label %if-else
+if-then: ; preds = %0
+ %fun_ptr = bitcast i32* %f to i32 (i32, i32*, i32)* ; <i32 (i32, i32*, i32)*> [#uses=1]
+ %arg1 = add i32 %x, -1 ; <i32> [#uses=1]
+ %res = tail call fastcc i32 %fun_ptr( i32 %arg1, i32* %f, i32 %g ) ; <i32> [#uses=1]
+ ret i32 %res
+if-else: ; preds = %0
+ ret i32 %x
}
+
diff --git a/test/ExecutionEngine/hello.ll b/test/ExecutionEngine/hello.ll
index ea2f9a4cce..a0c5e1a48d 100644
--- a/test/ExecutionEngine/hello.ll
+++ b/test/ExecutionEngine/hello.ll
@@ -1,14 +1,12 @@
-; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
+; RUN: llvm-as < %s -f -o %t.bc
; RUN: lli %t.bc > /dev/null
-%.LC0 = internal global [12 x sbyte] c"Hello World\00"
+@.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1]
-implementation
+declare i32 @puts(i8*)
-declare int %puts(sbyte*)
-
-int %main() {
- %reg210 = call int %puts( sbyte* getelementptr ([12 x sbyte]* %.LC0, long 0, long 0) )
- ret int 0
+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/hello2.ll b/test/ExecutionEngine/hello2.ll
index b186c52e2b..772dc0493e 100644
--- a/test/ExecutionEngine/he