[llvm-commits] [test-suite] r40848 - in /test-suite/trunk/LLVMSource: 2002-02-12-setuw-setsw.ll 2003-08-03-ReservedWordGlobal.ll Hello.ll InvokeUnwind.ll
Anton Korobeynikov
asl at math.spbu.ru
Sun Aug 5 12:11:02 PDT 2007
Author: asl
Date: Sun Aug 5 14:11:02 2007
New Revision: 40848
URL: http://llvm.org/viewvc/llvm-project?rev=40848&view=rev
Log:
Update these to 2.x syntax
Modified:
test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll
test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll
test-suite/trunk/LLVMSource/Hello.ll
test-suite/trunk/LLVMSource/InvokeUnwind.ll
Modified: test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll?rev=40848&r1=40847&r2=40848&view=diff
==============================================================================
--- test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll (original)
+++ test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll Sun Aug 5 14:11:02 2007
@@ -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
}
Modified: test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll?rev=40848&r1=40847&r2=40848&view=diff
==============================================================================
--- test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll (original)
+++ test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll Sun Aug 5 14:11:02 2007
@@ -1,8 +1,7 @@
-%Sp = linkonce global int 0 ; <int*> [#uses=1]
+; ModuleID = '2003-08-03-ReservedWordGlobal.ll'
+ at 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
}
Modified: test-suite/trunk/LLVMSource/Hello.ll
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/Hello.ll?rev=40848&r1=40847&r2=40848&view=diff
==============================================================================
--- test-suite/trunk/LLVMSource/Hello.ll (original)
+++ test-suite/trunk/LLVMSource/Hello.ll Sun Aug 5 14:11:02 2007
@@ -1,11 +1,9 @@
-%.str_1 = internal constant [32 x sbyte] c"Hello world with %d arguments!\0A\00"
+; ModuleID = 'Hello.ll'
+ at .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
}
-
Modified: test-suite/trunk/LLVMSource/InvokeUnwind.ll
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/InvokeUnwind.ll?rev=40848&r1=40847&r2=40848&view=diff
==============================================================================
--- test-suite/trunk/LLVMSource/InvokeUnwind.ll (original)
+++ test-suite/trunk/LLVMSource/InvokeUnwind.ll Sun Aug 5 14:11:02 2007
@@ -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
}
More information about the llvm-commits
mailing list