summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-03-16 07:55:46 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-03-16 07:55:46 +0000
commitec6f1669d3d70845344a0af364b1a2a8c79449ca (patch)
treecafeeb8bebc749516b6e8ef903ee678e6c3d82d7
parent942035d8b3dd77dc0380ab96028b84d3e91e9401 (diff)
downloadbcm5719-llvm-ec6f1669d3d70845344a0af364b1a2a8c79449ca.tar.gz
bcm5719-llvm-ec6f1669d3d70845344a0af364b1a2a8c79449ca.zip
All of these tests had out of date syntax and were never even running through
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. llvm-svn: 48417
-rw-r--r--llvm/test/Verifier/2002-04-13-RetTypes.ll7
-rw-r--r--llvm/test/Verifier/2002-11-05-GetelementptrPointers.ll6
-rw-r--r--llvm/test/Verifier/2005-03-21-UndefinedTypeReference.ll5
-rw-r--r--llvm/test/Verifier/2006-07-11-StoreStruct.ll8
-rw-r--r--llvm/test/Verifier/2006-12-12-IntrinsicDefine.ll4
-rw-r--r--llvm/test/Verifier/AmbiguousPhi.ll10
-rw-r--r--llvm/test/Verifier/PhiGrouping.ll14
7 files changed, 26 insertions, 28 deletions
diff --git a/llvm/test/Verifier/2002-04-13-RetTypes.ll b/llvm/test/Verifier/2002-04-13-RetTypes.ll
index 1ebed17a02b..197f5c24fc4 100644
--- a/llvm/test/Verifier/2002-04-13-RetTypes.ll
+++ b/llvm/test/Verifier/2002-04-13-RetTypes.ll
@@ -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
diff --git a/llvm/test/Verifier/2002-11-05-GetelementptrPointers.ll b/llvm/test/Verifier/2002-11-05-GetelementptrPointers.ll
index d1e516953ac..e37a0ffd324 100644
--- a/llvm/test/Verifier/2002-11-05-GetelementptrPointers.ll
+++ b/llvm/test/Verifier/2002-11-05-GetelementptrPointers.ll
@@ -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
}
diff --git a/llvm/test/Verifier/2005-03-21-UndefinedTypeReference.ll b/llvm/test/Verifier/2005-03-21-UndefinedTypeReference.ll
index 653eeec949c..19a9826ea52 100644
--- a/llvm/test/Verifier/2005-03-21-UndefinedTypeReference.ll
+++ b/llvm/test/Verifier/2005-03-21-UndefinedTypeReference.ll
@@ -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
}
diff --git a/llvm/test/Verifier/2006-07-11-StoreStruct.ll b/llvm/test/Verifier/2006-07-11-StoreStruct.ll
index 31e2dd44069..655e4b748ef 100644
--- a/llvm/test/Verifier/2006-07-11-StoreStruct.ll
+++ b/llvm/test/Verifier/2006-07-11-StoreStruct.ll
@@ -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
}
diff --git a/llvm/test/Verifier/2006-12-12-IntrinsicDefine.ll b/llvm/test/Verifier/2006-12-12-IntrinsicDefine.ll
index a7fe2745c4b..b63ae65aa2e 100644
--- a/llvm/test/Verifier/2006-12-12-IntrinsicDefine.ll
+++ b/llvm/test/Verifier/2006-12-12-IntrinsicDefine.ll
@@ -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
}
diff --git a/llvm/test/Verifier/AmbiguousPhi.ll b/llvm/test/Verifier/AmbiguousPhi.ll
index f64ec3fd77e..9a725301877 100644
--- a/llvm/test/Verifier/AmbiguousPhi.ll
+++ b/llvm/test/Verifier/AmbiguousPhi.ll
@@ -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
}
diff --git a/llvm/test/Verifier/PhiGrouping.ll b/llvm/test/Verifier/PhiGrouping.ll
index aa1203b73a0..dc529dced36 100644
--- a/llvm/test/Verifier/PhiGrouping.ll
+++ b/llvm/test/Verifier/PhiGrouping.ll
@@ -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
}
OpenPOWER on IntegriCloud