All of these tests had out of date syntax and were never even running through
authorNick Lewycky <nicholas@mxc.ca>
Sun, 16 Mar 2008 07:55:46 +0000 (07:55 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 16 Mar 2008 07:55:46 +0000 (07:55 +0000)
llvm-upgrade because nobody noticed them failing.

Update to use new syntax and actually check for the right failure by looking at
the error message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48417 91177308-0d34-0410-b5e6-96231b3b80d8

test/Verifier/2002-04-13-RetTypes.ll
test/Verifier/2002-11-05-GetelementptrPointers.ll
test/Verifier/2005-03-21-UndefinedTypeReference.ll
test/Verifier/2006-07-11-StoreStruct.ll
test/Verifier/2006-12-12-IntrinsicDefine.ll
test/Verifier/AmbiguousPhi.ll
test/Verifier/PhiGrouping.ll

index 1ebed17a02b0e9914a3544ecce40dbf69ac27036..197f5c24fc4c6f5da7e0e8cdc9962840a1e35823 100644 (file)
@@ -1,11 +1,10 @@
-; RUN: not llvm-as -f %s -o /dev/null
+; RUN: not llvm-as < %s |& grep {return type does not match operand type}
 
 ; Verify the the operand type of the ret instructions in a function match the
 ; delcared return type of the function they live in.
 ;
-implementation
 
-uint "testfunc"()
+define i32 @testfunc()
 begin
-       ret int* null
+       ret i32* null
 end
index d1e516953ac38d58555e627c71659b87ed6e8799..e37a0ffd324953fcf409ad7e3093ae242b1cbc38 100644 (file)
@@ -1,9 +1,9 @@
-; RUN: not llvm-as -f %s -o /dev/null
+; RUN: not llvm-as < %s |& grep {Invalid getelementptr indices}
 
 ; This testcase is invalid because we are indexing into a pointer that is 
 ; contained WITHIN a structure.
 
-void %test({int, int*} * %X) {
-       getelementptr {int, int*} * %X, long 0, uint 1, long 0
+define void @test({i32, i32*} * %X) {
+       getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
        ret void
 }
index 653eeec949c50c1488d841fdf4f79f09702418a0..19a9826ea52cd058ea418dc2a0fa6ade27cf49c6 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: not llvm-as -f %s -o /dev/null
-void %test() {
+; RUN: not llvm-as < %s |& grep {Reference to an undefined type}
+
+define void @test() {
         malloc %InvalidType
         ret void
 }
index 31e2dd44069ee25cc3a50c448fc59d660ef88058..655e4b748ef5e48d1930205eae95a3f9ff05b38b 100644 (file)
@@ -1,11 +1,9 @@
-; RUN: not llvm-as %s -o /dev/null -f
+; RUN: not llvm-as < %s |& grep {Instruction operands must be first-class}
 ; PR826
 
-        %struct_4 = type { int }
+        %struct_4 = type { i32 }
 
-implementation   ; Functions:
-
-void %test() {
+define void @test() {
         store %struct_4 zeroinitializer, %struct_4* null
         unreachable
 }
index a7fe2745c4b17fba9be8c591c050d571b9b01c3d..b63ae65aa2e7f6cef5a8b111e0032f1df6f1079d 100644 (file)
@@ -1,7 +1,7 @@
-; RUN: not llvm-as < %s
+; RUN: not llvm-as < %s |& grep {llvm intrinsics cannot be defined}
 ; PR1047
 
-void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint) {
+define void @llvm.memcpy.i32(i8*, i8*, i32, i32) {
 entry:
        ret void
 }
index f64ec3fd77e42f155033f5267b578a2408328b77..9a72530187752a44f0ef30c5bca5658d900557d7 100644 (file)
@@ -1,10 +1,10 @@
-; RUN: not llvm-as -f %s -o /dev/null
+; RUN: not llvm-as < %s |& grep {multiple entries for the same basic block}
 
 
 
-int "test"(int %i, int %j, bool %c) {
-       br bool %c, label %A, label %A
+define i32 @test(i32 %i, i32 %j, i1 %c) {
+       br i1 %c, label %A, label %A
 A:
-       %a = phi int [%i, %0], [%j, %0]  ; Error, different values from same block!
-       ret int %a
+       %a = phi i32 [%i, %0], [%j, %0]  ; Error, different values from same block!
+       ret i32 %a
 }
index aa1203b73a0870359e3eadddd062334fc39ea432..dc529dced3657cd172d811ad82b8a3de2742d46d 100644 (file)
@@ -1,17 +1,17 @@
-; RUN: not llvm-as -f %s -o /dev/null
+; RUN: not llvm-as < %s |& grep {PHI nodes not grouped at top}
 
 
 
-int "test"(int %i, int %j, bool %c) {
-       br bool %c, label %A, label %B
+define i32 @test(i32 %i, i32 %j, i1 %c) {
+       br i1 %c, label %A, label %B
 A:
        br label %C
 B:
        br label %C
 
 C:
-       %a = phi int [%i, %A], [%j, %B]
-       %x = add int %a, 0                 ; Error, PHI's should be grouped!
-       %b = phi int [%i, %A], [%j, %B]
-       ret int %x
+       %a = phi i32 [%i, %A], [%j, %B]
+       %x = add i32 %a, 0                 ; Error, PHI's should be grouped!
+       %b = phi i32 [%i, %A], [%j, %B]
+       ret i32 %x
 }