llvm.org GIT mirror llvm / cd0aa81
Adding RUN lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17527 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 15 years ago
46 changed file(s) with 92 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; Make sure that global variables do not collide if they have the same name,
13 ; but different types.
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; This case was emitting code that looked like this:
13 ; ...
24 ; llvm_BB1: /* no statement here */
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; Test const pointer refs & forward references
13
24 %t3 = global int * %t1 ;; Forward reference
0 ; RUN: llvm-as < %s | llc -march=c
1
2 global int* cast (float* %0 to int*) ;; Forward numeric reference
13 global float* %0 ;; Duplicate forward numeric reference
24 global float 0.0
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
13 %somestr = constant [11x sbyte] c"hello world"
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %fptr = global void() * %f ;; Forward ref method defn
13 declare void "f"() ;; External method
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %array = constant [2 x int] [ int 12, int 52 ] ; <[2 x int]*> [#uses=1]
13 %arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0) ; [#uses=1]
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %MyIntList = uninitialized global { \2 *, int }
13
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; The C Writer bombs on this testcase because it tries the print the prototype
13 ; for the test function, which tries to print the argument name. The function
24 ; has not been incorporated into the slot calculator, so after it does the name
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; Indirect function call test... found by Joel & Brian
13 ;
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; This testcase fails because the C backend does not arrange to output the
13 ; contents of a structure type before it outputs the structure type itself.
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13
24 implementation
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 declare void %foo(...)
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %MPI_Comm = type %struct.Comm*
13 %struct.Comm = type opaque
24 %thing = global %MPI_Comm* null ; <%MPI_Comm**> [#uses=0]
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %bob = external global int ; [#uses=2]
13
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 %BitField = type int
24 %tokenptr = type %BitField*
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %testString = internal constant [18 x sbyte] c "Escaped newline\n\00"
13
24 implementation
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; Apparently this constant was unsigned in ISO C 90, but not in C 99.
13
24 int %foo() {
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; This testcase breaks the C backend, because gcc doesn't like (...) functions
13 ; with no arguments at all.
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; The C backend was dying when there was no typename for a struct type!
13
24 declare int %test(int,{ [32 x int] }*)
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 %X = type { int, float }
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; Make sure hex constant does not continue into a valid hexadecimal letter/number
13 %version = global [3 x sbyte] c"\001\00"
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 %version = global [3 x sbyte] c"1\00\00"
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 declare int %callee(int, int)
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; This is a non-normal FP value: it's a nan.
13 %NAN = global { float } { float 0x7FF8000000000000 }
24 %NANs = global { float } { float 0x7FF4000000000000 }
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 %A = type { uint, sbyte*, { uint, uint, uint, uint, uint, uint, uint, uint }*, ushort }
24
0 ; RUN: llvm-as < %s | llc -march=c
1
2
13 declare sbyte* %llvm.va_start()
24 declare void %llvm.va_end(sbyte*)
0 ; RUN: llvm-as < %s | llc -march=c
1
2 ; reduced from DOOM.
13 %union._XEvent = type { int }
24 %.X_event_9 = global %union._XEvent zeroinitializer
0 ; RUN: llvm-as < %s | llc -march=c
1
2 %y = weak global sbyte 0
13 implementation
24 uint %testcaseshr() {
0 ; RUN: llvm-as < %s | llc -march=c
1
2 declare void %llvm.va_end(sbyte*)
13
24 void %test() {
0 ; RUN: llvm-as < %s | llc
1
2 int %foo(int %x) {
13 ret int %x
24 }
0 ; RUN: llvm-as < %s | llc
1
2 int %foo(int %x) {
13 ret int 42
24 }
0 ; RUN: llvm-as < %s | llc
1
2 void %foo() {
13 ret void
24 }
0 ; RUN: llvm-as < %s | llc
1
2 int %bar(int %x) {
13 ret int 0
24 }
0 ; RUN: llvm-as < %s | llc
1
2 %a_fstr = internal constant [8 x sbyte] c"a = %f\0A\00"
13 %a_lstr = internal constant [10 x sbyte] c"a = %lld\0A\00"
24 %a_dstr = internal constant [8 x sbyte] c"a = %d\0A\00"
0 ; RUN: llvm-as < %s | llc
1
2 %g = global int 0
13
24 int %main() {
0 ; RUN: llvm-as < %s | llc
1
2 %.str_1 = internal constant [7 x sbyte] c"hello\0A\00"
13
24 declare int %printf(sbyte*, ...)
0 ; RUN: llvm-as < %s | llc
1
2 %.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
13
24 declare int %printf(sbyte*, ...)
0 ; RUN: llvm-as < %s | llc
1
2 %a_str = internal constant [8 x sbyte] c"a = %f\0A\00"
13 %b_str = internal constant [8 x sbyte] c"b = %f\0A\00"
24 ;; binary ops: arith
0 ; RUN: llvm-as < %s | llc
1
2 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
13 %b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
24 ;; binary ops: arith
0 ; RUN: llvm-as < %s | llc
1
2 %.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
13
24 declare int %printf(sbyte*, ...)
0 ; RUN: llvm-as < %s | llc
1
2 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
13 %a_mul_str = internal constant [13 x sbyte] c"a * %d = %d\0A\00"
24 %A = global int 2
0 ; RUN: llvm-as < %s | llc
1
2 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
13 %b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
24
0 ; RUN: llvm-as < %s | llc
1
2 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
13 %b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
24
0 ; RUN: llvm-as < %s | llc
1
2 int %main() {
13 ret int 0
24 }
0 ; RUN: llvm-as < %s | llc
1
2 int %main() {
13 ret int 42
24 }