llvm.org GIT mirror llvm / 3f63785
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48417 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 12 years ago
7 changed file(s) with 26 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
None ; RUN: not llvm-as -f %s -o /dev/null
0 ; RUN: not llvm-as < %s |& grep {return type does not match operand type}
11
22 ; Verify the the operand type of the ret instructions in a function match the
33 ; delcared return type of the function they live in.
44 ;
5 implementation
65
7 uint "testfunc"()
6 define i32 @testfunc()
87 begin
9 ret int* null
8 ret i32* null
109 end
None ; RUN: not llvm-as -f %s -o /dev/null
0 ; RUN: not llvm-as < %s |& grep {Invalid getelementptr indices}
11
22 ; This testcase is invalid because we are indexing into a pointer that is
33 ; contained WITHIN a structure.
44
5 void %test({int, int*} * %X) {
6 getelementptr {int, int*} * %X, long 0, uint 1, long 0
5 define void @test({i32, i32*} * %X) {
6 getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
77 ret void
88 }
None ; RUN: not llvm-as -f %s -o /dev/null
1 void %test() {
0 ; RUN: not llvm-as < %s |& grep {Reference to an undefined type}
1
2 define void @test() {
23 malloc %InvalidType
34 ret void
45 }
None ; RUN: not llvm-as %s -o /dev/null -f
0 ; RUN: not llvm-as < %s |& grep {Instruction operands must be first-class}
11 ; PR826
22
3 %struct_4 = type { int }
3 %struct_4 = type { i32 }
44
5 implementation ; Functions:
6
7 void %test() {
5 define void @test() {
86 store %struct_4 zeroinitializer, %struct_4* null
97 unreachable
108 }
None ; RUN: not llvm-as < %s
0 ; RUN: not llvm-as < %s |& grep {llvm intrinsics cannot be defined}
11 ; PR1047
22
3 void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint) {
3 define void @llvm.memcpy.i32(i8*, i8*, i32, i32) {
44 entry:
55 ret void
66 }
None ; RUN: not llvm-as -f %s -o /dev/null
0 ; RUN: not llvm-as < %s |& grep {multiple entries for the same basic block}
11
22
33
4 int "test"(int %i, int %j, bool %c) {
5 br bool %c, label %A, label %A
4 define i32 @test(i32 %i, i32 %j, i1 %c) {
5 br i1 %c, label %A, label %A
66 A:
7 %a = phi int [%i, %0], [%j, %0] ; Error, different values from same block!
8 ret int %a
7 %a = phi i32 [%i, %0], [%j, %0] ; Error, different values from same block!
8 ret i32 %a
99 }
None ; RUN: not llvm-as -f %s -o /dev/null
0 ; RUN: not llvm-as < %s |& grep {PHI nodes not grouped at top}
11
22
33
4 int "test"(int %i, int %j, bool %c) {
5 br bool %c, label %A, label %B
4 define i32 @test(i32 %i, i32 %j, i1 %c) {
5 br i1 %c, label %A, label %B
66 A:
77 br label %C
88 B:
99 br label %C
1010
1111 C:
12 %a = phi int [%i, %A], [%j, %B]
13 %x = add int %a, 0 ; Error, PHI's should be grouped!
14 %b = phi int [%i, %A], [%j, %B]
15 ret int %x
12 %a = phi i32 [%i, %A], [%j, %B]
13 %x = add i32 %a, 0 ; Error, PHI's should be grouped!
14 %b = phi i32 [%i, %A], [%j, %B]
15 ret i32 %x
1616 }