mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
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
This commit is contained in:
@@ -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
|
; Verify the the operand type of the ret instructions in a function match the
|
||||||
; delcared return type of the function they live in.
|
; delcared return type of the function they live in.
|
||||||
;
|
;
|
||||||
implementation
|
|
||||||
|
|
||||||
uint "testfunc"()
|
define i32 @testfunc()
|
||||||
begin
|
begin
|
||||||
ret int* null
|
ret i32* null
|
||||||
end
|
end
|
||||||
|
@@ -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
|
; This testcase is invalid because we are indexing into a pointer that is
|
||||||
; contained WITHIN a structure.
|
; contained WITHIN a structure.
|
||||||
|
|
||||||
void %test({int, int*} * %X) {
|
define void @test({i32, i32*} * %X) {
|
||||||
getelementptr {int, int*} * %X, long 0, uint 1, long 0
|
getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
; RUN: not llvm-as -f %s -o /dev/null
|
; RUN: not llvm-as < %s |& grep {Reference to an undefined type}
|
||||||
void %test() {
|
|
||||||
|
define void @test() {
|
||||||
malloc %InvalidType
|
malloc %InvalidType
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
@@ -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
|
; PR826
|
||||||
|
|
||||||
%struct_4 = type { int }
|
%struct_4 = type { i32 }
|
||||||
|
|
||||||
implementation ; Functions:
|
define void @test() {
|
||||||
|
|
||||||
void %test() {
|
|
||||||
store %struct_4 zeroinitializer, %struct_4* null
|
store %struct_4 zeroinitializer, %struct_4* null
|
||||||
unreachable
|
unreachable
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
; RUN: not llvm-as < %s
|
; RUN: not llvm-as < %s |& grep {llvm intrinsics cannot be defined}
|
||||||
; PR1047
|
; PR1047
|
||||||
|
|
||||||
void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint) {
|
define void @llvm.memcpy.i32(i8*, i8*, i32, i32) {
|
||||||
entry:
|
entry:
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
define i32 @test(i32 %i, i32 %j, i1 %c) {
|
||||||
br bool %c, label %A, label %A
|
br i1 %c, label %A, label %A
|
||||||
A:
|
A:
|
||||||
%a = phi int [%i, %0], [%j, %0] ; Error, different values from same block!
|
%a = phi i32 [%i, %0], [%j, %0] ; Error, different values from same block!
|
||||||
ret int %a
|
ret i32 %a
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
define i32 @test(i32 %i, i32 %j, i1 %c) {
|
||||||
br bool %c, label %A, label %B
|
br i1 %c, label %A, label %B
|
||||||
A:
|
A:
|
||||||
br label %C
|
br label %C
|
||||||
B:
|
B:
|
||||||
br label %C
|
br label %C
|
||||||
|
|
||||||
C:
|
C:
|
||||||
%a = phi int [%i, %A], [%j, %B]
|
%a = phi i32 [%i, %A], [%j, %B]
|
||||||
%x = add int %a, 0 ; Error, PHI's should be grouped!
|
%x = add i32 %a, 0 ; Error, PHI's should be grouped!
|
||||||
%b = phi int [%i, %A], [%j, %B]
|
%b = phi i32 [%i, %A], [%j, %B]
|
||||||
ret int %x
|
ret i32 %x
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user