Moving CBE tests to test/Regression/CodeGen/CBackend
authorChris Lattner <sabre@nondot.org>
Sun, 15 Feb 2004 22:56:30 +0000 (22:56 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Feb 2004 22:56:30 +0000 (22:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11486 91177308-0d34-0410-b5e6-96231b3b80d8

33 files changed:
test/CBackend/2002-05-16-NameCollide.ll [deleted file]
test/CBackend/2002-05-21-MissingReturn.ll [deleted file]
test/CBackend/2002-08-19-ConstPointerRef.ll [deleted file]
test/CBackend/2002-08-19-ConstantExpr.ll [deleted file]
test/CBackend/2002-08-19-DataPointer.ll [deleted file]
test/CBackend/2002-08-19-FunctionPointer.ll [deleted file]
test/CBackend/2002-08-19-HardConstantExpr.ll [deleted file]
test/CBackend/2002-08-20-RecursiveTypes.ll [deleted file]
test/CBackend/2002-08-20-UnnamedArgument.ll [deleted file]
test/CBackend/2002-08-26-IndirectCallTest.ll [deleted file]
test/CBackend/2002-08-30-StructureOrderingTest.ll [deleted file]
test/CBackend/2002-09-20-ArrayTypeFailure.ll [deleted file]
test/CBackend/2002-09-20-VarArgPrototypes.ll [deleted file]
test/CBackend/2002-10-15-OpaqueTypeProblem.ll [deleted file]
test/CBackend/2002-10-16-External.ll [deleted file]
test/CBackend/2002-10-30-FunctionPointerAlloca.ll [deleted file]
test/CBackend/2002-11-06-PrintEscaped.ll [deleted file]
test/CBackend/2003-05-12-IntegerSizeWarning.ll [deleted file]
test/CBackend/2003-05-13-VarArgFunction.ll [deleted file]
test/CBackend/2003-05-31-MissingStructName.ll [deleted file]
test/CBackend/2003-06-01-NullPointerType.ll [deleted file]
test/CBackend/2003-06-11-HexConstant.ll [deleted file]
test/CBackend/2003-06-11-LiteralStringProblem.ll [deleted file]
test/CBackend/2003-06-23-PromotedExprs.llx [deleted file]
test/CBackend/2003-06-28-InvokeSupport.ll [deleted file]
test/CBackend/2003-06-28-LinkOnceGlobalVars.llx [deleted file]
test/CBackend/2003-10-12-NANGlobalInits.ll [deleted file]
test/CBackend/2003-10-23-UnusedType.ll [deleted file]
test/CBackend/2003-10-23-ZeroArgVarargs.ll [deleted file]
test/CBackend/2003-10-28-CastToPtrToStruct.ll [deleted file]
test/CBackend/2003-11-21-ConstantShiftExpr.ll [deleted file]
test/CBackend/2004-02-13-FrameReturnAddress.llx [deleted file]
test/CBackend/2004-02-15-PreexistingExternals.llx [deleted file]

diff --git a/test/CBackend/2002-05-16-NameCollide.ll b/test/CBackend/2002-05-16-NameCollide.ll
deleted file mode 100644 (file)
index c08024b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-; Make sure that global variables do not collide if they have the same name,
-; but different types.
-
-%X = global int 5
-%X = global long 7
diff --git a/test/CBackend/2002-05-21-MissingReturn.ll b/test/CBackend/2002-05-21-MissingReturn.ll
deleted file mode 100644 (file)
index 2fd3e27..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-; This case was emitting code that looked like this:
-; ...
-;   llvm_BB1:       /* no statement here */
-; }
-; 
-; Which the Sun C compiler rejected, so now we are sure to put a return 
-; instruction in there if the basic block is otherwise empty.
-;
-void "test"() {
-       br label %BB1
-BB2:
-       br label %BB2
-BB1:
-       ret void
-}
diff --git a/test/CBackend/2002-08-19-ConstPointerRef.ll b/test/CBackend/2002-08-19-ConstPointerRef.ll
deleted file mode 100644 (file)
index 8654baa..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-; Test const pointer refs & forward references
-
-%t3 = global int * %t1           ;; Forward reference
-%t1 = global int 4
-
diff --git a/test/CBackend/2002-08-19-ConstantExpr.ll b/test/CBackend/2002-08-19-ConstantExpr.ll
deleted file mode 100644 (file)
index bbd34ec..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-global int* cast (float* %0 to int*)   ;; Forward numeric reference
-global float* %0                       ;; Duplicate forward numeric reference
-global float 0.0
-
-%array  = constant [2 x int] [ int 12, int 52 ]
-%arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0)    ;; int* &%array[0][0]
-
diff --git a/test/CBackend/2002-08-19-DataPointer.ll b/test/CBackend/2002-08-19-DataPointer.ll
deleted file mode 100644 (file)
index f7481ea..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-%sptr1   = global [11x sbyte]* %somestr         ;; Forward ref to a constant
-%somestr = constant [11x sbyte] c"hello world"
-
diff --git a/test/CBackend/2002-08-19-FunctionPointer.ll b/test/CBackend/2002-08-19-FunctionPointer.ll
deleted file mode 100644 (file)
index ac28d93..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-%fptr = global void() * %f       ;; Forward ref method defn
-declare void "f"()               ;; External method
-
diff --git a/test/CBackend/2002-08-19-HardConstantExpr.ll b/test/CBackend/2002-08-19-HardConstantExpr.ll
deleted file mode 100644 (file)
index b0dca8e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-%array = constant [2 x int] [ int 12, int 52 ]          ; <[2 x int]*> [#uses=1]
-%arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0)               ; <int**> [#uses=1]
-
diff --git a/test/CBackend/2002-08-20-RecursiveTypes.ll b/test/CBackend/2002-08-20-RecursiveTypes.ll
deleted file mode 100644 (file)
index cb20180..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-%MyIntList = uninitialized global { \2 *, int }
-
diff --git a/test/CBackend/2002-08-20-UnnamedArgument.ll b/test/CBackend/2002-08-20-UnnamedArgument.ll
deleted file mode 100644 (file)
index 842c2d7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; The C Writer bombs on this testcase because it tries the print the prototype
-; for the test function, which tries to print the argument name.  The function
-; has not been incorporated into the slot calculator, so after it does the name
-; lookup, it tries a slot calculator lookup, which fails.
-
-int %test(int) {
-        ret int 0
-}
-
diff --git a/test/CBackend/2002-08-26-IndirectCallTest.ll b/test/CBackend/2002-08-26-IndirectCallTest.ll
deleted file mode 100644 (file)
index c8eeb59..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-; Indirect function call test... found by Joel & Brian
-;
-
-%taskArray = uninitialized global int*
-
-void %test(int %X) {
-       %Y = add int %X, -1          ; <int>:1 [#uses=3]
-        %cast100 = cast int %Y to long          ; <uint> [#uses=1]
-        %gep100 = getelementptr int** %taskArray, long %cast100         ; <int**> [#uses=1]
-        %fooPtr = load int** %gep100            ; <int*> [#uses=1]
-        %cast101 = cast int* %fooPtr to void (int)*             ; <void (int)*> [#uses=1]
-        call void %cast101( int 1000 )
-       ret void
-}
diff --git a/test/CBackend/2002-08-30-StructureOrderingTest.ll b/test/CBackend/2002-08-30-StructureOrderingTest.ll
deleted file mode 100644 (file)
index 36b9f34..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-; This testcase fails because the C backend does not arrange to output the 
-; contents of a structure type before it outputs the structure type itself.
-
-%Y = uninitialized global { {int } }
-%X = uninitialized global { float }
diff --git a/test/CBackend/2002-09-20-ArrayTypeFailure.ll b/test/CBackend/2002-09-20-ArrayTypeFailure.ll
deleted file mode 100644 (file)
index 87eaadc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-implementation
-
-void %test() {
-       %X = alloca [4xint]
-       ret void
-}
diff --git a/test/CBackend/2002-09-20-VarArgPrototypes.ll b/test/CBackend/2002-09-20-VarArgPrototypes.ll
deleted file mode 100644 (file)
index 6f318fa..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-declare void %foo(...)
-
-
diff --git a/test/CBackend/2002-10-15-OpaqueTypeProblem.ll b/test/CBackend/2002-10-15-OpaqueTypeProblem.ll
deleted file mode 100644 (file)
index 1cd65c2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-       %MPI_Comm = type %struct.Comm*
-       %struct.Comm = type opaque
-%thing = global %MPI_Comm* null                ; <%MPI_Comm**> [#uses=0]
-
-implementation   ; Functions:
diff --git a/test/CBackend/2002-10-16-External.ll b/test/CBackend/2002-10-16-External.ll
deleted file mode 100644 (file)
index 3ad9089..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-%bob = external global int              ; <int*> [#uses=2]
-
diff --git a/test/CBackend/2002-10-30-FunctionPointerAlloca.ll b/test/CBackend/2002-10-30-FunctionPointerAlloca.ll
deleted file mode 100644 (file)
index 2e21ee7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-       %BitField = type int
-        %tokenptr = type %BitField*
-
-implementation
-
-void %test() {
-       %pmf1 = alloca %tokenptr (%tokenptr, sbyte*)*
-       ret void
-}
diff --git a/test/CBackend/2002-11-06-PrintEscaped.ll b/test/CBackend/2002-11-06-PrintEscaped.ll
deleted file mode 100644 (file)
index 9451212..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-%testString = internal constant [18 x sbyte] c "Escaped newline\n\00"
-
-implementation
-
-declare int %printf(sbyte*, ...)
-
-int %main() {
-  call int (sbyte*, ...)* %printf( sbyte* getelementptr ([18 x sbyte]* %testString, long 0, long 0))
-  ret int 0
-}
diff --git a/test/CBackend/2003-05-12-IntegerSizeWarning.ll b/test/CBackend/2003-05-12-IntegerSizeWarning.ll
deleted file mode 100644 (file)
index f709dfd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-; Apparently this constant was unsigned in ISO C 90, but not in C 99.
-
-int %foo() {
-       ret int -2147483648
-}
diff --git a/test/CBackend/2003-05-13-VarArgFunction.ll b/test/CBackend/2003-05-13-VarArgFunction.ll
deleted file mode 100644 (file)
index 1b2c2b8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-; This testcase breaks the C backend, because gcc doesn't like (...) functions
-; with no arguments at all.
-
-void %test(long %Ptr) {
-       %P = cast long %Ptr to void(...) *
-       call void(...)* %P(long %Ptr)
-       ret void
-}
diff --git a/test/CBackend/2003-05-31-MissingStructName.ll b/test/CBackend/2003-05-31-MissingStructName.ll
deleted file mode 100644 (file)
index 1eae406..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-; The C backend was dying when there was no typename for a struct type!
-
-declare int %test(int,{ [32 x int] }*)
-
diff --git a/test/CBackend/2003-06-01-NullPointerType.ll b/test/CBackend/2003-06-01-NullPointerType.ll
deleted file mode 100644 (file)
index 3121923..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-%X = type { int, float }
-
-void %test() {
-  getelementptr %X* null, long 0, ubyte 1
-  ret void
-}
diff --git a/test/CBackend/2003-06-11-HexConstant.ll b/test/CBackend/2003-06-11-HexConstant.ll
deleted file mode 100644 (file)
index 31bbf88..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-; Make sure hex constant does not continue into a valid hexadecimal letter/number
-%version = global [3 x sbyte] c"\001\00"
-
diff --git a/test/CBackend/2003-06-11-LiteralStringProblem.ll b/test/CBackend/2003-06-11-LiteralStringProblem.ll
deleted file mode 100644 (file)
index 80d8aea..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-%version = global [3 x sbyte] c"1\00\00"
-
diff --git a/test/CBackend/2003-06-23-PromotedExprs.llx b/test/CBackend/2003-06-23-PromotedExprs.llx
deleted file mode 100644 (file)
index d3ad57f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-; RUN: llvm-as < %s | llc -march=c > %t1.cbe.c
-; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
-; RUN: %t1.cbe
-
-bool %doTest(ubyte %x) {
-       %dec.0 = add ubyte %x, 255
-    %tmp.1001 = cast ubyte %dec.0 to bool
-    ret bool %tmp.1001
-}
-
-int %main () {
-    %result = call bool %doTest(ubyte 1)
-    %p = cast bool %result to int
-    ret int %p
-}
diff --git a/test/CBackend/2003-06-28-InvokeSupport.ll b/test/CBackend/2003-06-28-InvokeSupport.ll
deleted file mode 100644 (file)
index 65ccc5c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-declare int %callee(int, int)
-
-
-int %test(int %X) {
-       %A = invoke int %callee(int %X, int 5) to label %Ok except label %Threw
-Ok:
-       %B = phi int [%A, %0], [-1, %Threw]
-       ret int %A
-Threw:
-       br label %Ok
-}
diff --git a/test/CBackend/2003-06-28-LinkOnceGlobalVars.llx b/test/CBackend/2003-06-28-LinkOnceGlobalVars.llx
deleted file mode 100644 (file)
index acb3c22..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-; RUN: llvm-as < %s | llc -march=c | grep common | grep X
-
-%X = linkonce global int 5
-
diff --git a/test/CBackend/2003-10-12-NANGlobalInits.ll b/test/CBackend/2003-10-12-NANGlobalInits.ll
deleted file mode 100644 (file)
index d206998..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-; This is a non-normal FP value: it's a nan.
-%NAN = global { float } { float 0x7FF8000000000000 } 
-
diff --git a/test/CBackend/2003-10-23-UnusedType.ll b/test/CBackend/2003-10-23-UnusedType.ll
deleted file mode 100644 (file)
index 97cee82..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-%A = type { uint, sbyte*, { uint, uint, uint, uint, uint, uint, uint, uint }*, ushort }
-
diff --git a/test/CBackend/2003-10-23-ZeroArgVarargs.ll b/test/CBackend/2003-10-23-ZeroArgVarargs.ll
deleted file mode 100644 (file)
index 4ba9741..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-declare sbyte* %llvm.va_start()
-declare void %llvm.va_end(sbyte*)
-
-void %test(...) {
-       %P = call sbyte* %llvm.va_start()
-       call void %llvm.va_end(sbyte* %P)
-       ret void
-}
diff --git a/test/CBackend/2003-10-28-CastToPtrToStruct.ll b/test/CBackend/2003-10-28-CastToPtrToStruct.ll
deleted file mode 100644 (file)
index f3a5775..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-; reduced from DOOM.
-%union._XEvent = type { int }
-%.X_event_9 = global %union._XEvent zeroinitializer
-
-implementation   ; Functions:
-void %I_InitGraphics() {
-shortcirc_next.3:              ; preds = %no_exit.1
-       %tmp.319 = load int* getelementptr ({ int, int }* cast (%union._XEvent* %.X_event_9 to { int, int }*), long 0, ubyte 1)         ; <int> [#uses=1]
-    ret void
-}
diff --git a/test/CBackend/2003-11-21-ConstantShiftExpr.ll b/test/CBackend/2003-11-21-ConstantShiftExpr.ll
deleted file mode 100644 (file)
index 5bd088d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-%y = weak global sbyte 0
-implementation
-uint %testcaseshr() {
-entry:
-       ret uint shr (uint cast (sbyte* %y to uint), ubyte 4)
-}
-uint %testcaseshl() {
-entry:
-       ret uint shl (uint cast (sbyte* %y to uint), ubyte 4)
-}
diff --git a/test/CBackend/2004-02-13-FrameReturnAddress.llx b/test/CBackend/2004-02-13-FrameReturnAddress.llx
deleted file mode 100644 (file)
index 613c03e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
-
-declare sbyte* %llvm.returnaddress(uint)
-declare sbyte* %llvm.frameaddress(uint)
-
-sbyte *%test1() {
-       %X = call sbyte* %llvm.returnaddress(uint 0)
-       ret sbyte* %X
-}
-
-sbyte *%test2() {
-       %X = call sbyte* %llvm.frameaddress(uint 0)
-       ret sbyte* %X
-}
diff --git a/test/CBackend/2004-02-15-PreexistingExternals.llx b/test/CBackend/2004-02-15-PreexistingExternals.llx
deleted file mode 100644 (file)
index 1c07708..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-; The intrinsic lowering pass was lowering intrinsics like llvm.memcpy to 
-; explicitly specified prototypes, inserting a new function if the old one
-; didn't exist.  This caused there to be two external memcpy functions in 
-; this testcase for example, which caused the CBE to mangle one, screwing
-; everything up.  :(  Test that this does not happen anymore.
-;
-; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
-
-declare void %llvm.memcpy(sbyte*, sbyte*, uint,uint)
-declare float* %memcpy(int*, uint,int)
-
-int %test(sbyte *%A, sbyte* %B, int* %C) {
-       call float* %memcpy(int* %C, uint 4, int 17)
-       call void %llvm.memcpy(sbyte* %A, sbyte* %B, uint 123, uint 14)
-       ret int 7
-}