aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-08-05 19:11:02 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-08-05 19:11:02 +0000
commitda915921cf06c41f769813db84a357414eeb2d45 (patch)
treed5803a72e9983cc41d54e89bf6882aba5f46b71a
parent656da7de1b6a737d2c84365ce02fd6b92dfa3ace (diff)
Update these to 2.x syntax
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@40848 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--LLVMSource/2002-02-12-setuw-setsw.ll23
-rw-r--r--LLVMSource/2003-08-03-ReservedWordGlobal.ll11
-rw-r--r--LLVMSource/Hello.ll14
-rw-r--r--LLVMSource/InvokeUnwind.ll37
4 files changed, 43 insertions, 42 deletions
diff --git a/LLVMSource/2002-02-12-setuw-setsw.ll b/LLVMSource/2002-02-12-setuw-setsw.ll
index f07c3516..57e93c9b 100644
--- a/LLVMSource/2002-02-12-setuw-setsw.ll
+++ b/LLVMSource/2002-02-12-setuw-setsw.ll
@@ -1,15 +1,14 @@
-; The sparc back-end is generating set-unsigned (setuw) for -2, when it
-; should be using setsw.
+; ModuleID = '2002-02-12-setuw-setsw.ll'
-implementation
+define i32 @main(i32 %argc, i8** %argv) {
+ %T1 = bitcast i32 2 to i32 ; <i32> [#uses=1]
+ %tmp = add i32 %T1, -2 ; <i32> [#uses=1]
+ %cond = icmp eq i32 %tmp, 0 ; <i1> [#uses=1]
+ br i1 %cond, label %Ok, label %Fail
-int %main(int %argc, sbyte * * %argv) {
- %T1 = cast int 2 to uint
- %tmp = add uint %T1, 4294967294 ; == -2
- %cond = seteq uint %tmp, 0
- br bool %cond, label %Ok, label %Fail
-Ok:
- ret int 0
-Fail:
- ret int 1
+Ok: ; preds = %0
+ ret i32 0
+
+Fail: ; preds = %0
+ ret i32 1
}
diff --git a/LLVMSource/2003-08-03-ReservedWordGlobal.ll b/LLVMSource/2003-08-03-ReservedWordGlobal.ll
index 5338a54b..2ff07f48 100644
--- a/LLVMSource/2003-08-03-ReservedWordGlobal.ll
+++ b/LLVMSource/2003-08-03-ReservedWordGlobal.ll
@@ -1,8 +1,7 @@
-%Sp = linkonce global int 0 ; <int*> [#uses=1]
+; ModuleID = '2003-08-03-ReservedWordGlobal.ll'
+@Sp = linkonce global i32 0 ; <i32*> [#uses=1]
-implementation ; Functions:
-
-int %main() {
- store int 123, int* %Sp
- ret int 0
+define i32 @main() {
+ store i32 123, i32* @Sp
+ ret i32 0
}
diff --git a/LLVMSource/Hello.ll b/LLVMSource/Hello.ll
index d8e4ebec..6861513b 100644
--- a/LLVMSource/Hello.ll
+++ b/LLVMSource/Hello.ll
@@ -1,11 +1,9 @@
-%.str_1 = internal constant [32 x sbyte] c"Hello world with %d arguments!\0A\00"
+; ModuleID = 'Hello.ll'
+@.str_1 = internal constant [32 x i8] c"Hello world with %d arguments!\0A\00" ; <[32 x i8]*> [#uses=1]
-implementation
+declare i32 @printf(i8*, ...)
-declare int %printf(sbyte*, ...)
-
-int %main(int %argc, sbyte** %argv) {
- %tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([32 x sbyte]* %.str_1, long 0, long 0), int %argc )
- ret int 0
+define i32 @main(i32 %argc, i8** %argv) {
+ %tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([32 x i8]* @.str_1, i64 0, i64 0), i32 %argc ) ; <i32> [#uses=0]
+ ret i32 0
}
-
diff --git a/LLVMSource/InvokeUnwind.ll b/LLVMSource/InvokeUnwind.ll
index 9b0afab4..e673d0bd 100644
--- a/LLVMSource/InvokeUnwind.ll
+++ b/LLVMSource/InvokeUnwind.ll
@@ -1,24 +1,29 @@
-; Test to make sure the invoke instruction and unwind are working...
+; ModuleID = 'InvokeUnwind.ll'
-implementation
+declare void @abort()
-declare void %abort()
+define internal void @throw(i1 %ShouldThrow) {
+ br i1 %ShouldThrow, label %Throw, label %NoThrow
-internal void %throw(bool %ShouldThrow) {
- br bool %ShouldThrow, label %Throw, label %NoThrow
-Throw:
+Throw: ; preds = %0
unwind
-NoThrow:
+
+NoThrow: ; preds = %0
ret void
}
-int %main() {
- invoke void %throw(bool false) to label %Cont except label %Abort
-Cont:
- invoke void %throw(bool true) to label %Abort except label %Exc
-Abort:
- call void %abort()
- ret int 1
-Exc:
- ret int 0
+define i32 @main() {
+ invoke void @throw( i1 false )
+ to label %Cont unwind label %Abort
+
+Cont: ; preds = %0
+ invoke void @throw( i1 true )
+ to label %Abort unwind label %Exc
+
+Abort: ; preds = %Cont, %0
+ call void @abort( )
+ ret i32 1
+
+Exc: ; preds = %Cont
+ ret i32 0
}