From: Tanya Lattner Date: Sun, 7 Nov 2004 06:08:43 +0000 (+0000) Subject: Added RUN lines and dejagnu support for Feature dir. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3f7706b5d23aca56a6d3a62ebb9466e1e89335f7;p=oota-llvm.git Added RUN lines and dejagnu support for Feature dir. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17568 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Feature/basictest.ll b/test/Feature/basictest.ll index 4fcc190cbb1..cabf6036dc3 100644 --- a/test/Feature/basictest.ll +++ b/test/Feature/basictest.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation ; Test "stripped" format where nothing is symbolic... this is how the bytecode diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll index 1be7ad59719..8adbe493718 100644 --- a/test/Feature/calltest.ll +++ b/test/Feature/calltest.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %FunTy = type int(int) declare int "test"(...) ; Test differences of prototype diff --git a/test/Feature/casttest.ll b/test/Feature/casttest.ll index 5b2db7b4886..acd47e575bb 100644 --- a/test/Feature/casttest.ll +++ b/test/Feature/casttest.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation short "FunFunc"(long %x, sbyte %z) diff --git a/test/Feature/cfgstructures.ll b/test/Feature/cfgstructures.ll index a28dfb3d70e..b044b5cf52e 100644 --- a/test/Feature/cfgstructures.ll +++ b/test/Feature/cfgstructures.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation ;; This is an irreducible flow graph diff --git a/test/Feature/constexpr.ll b/test/Feature/constexpr.ll index 5da6d806116..0572fc95ea8 100644 --- a/test/Feature/constexpr.ll +++ b/test/Feature/constexpr.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; This testcase is for testing expressions constructed from ; constant values, including constant pointers to globals. ; diff --git a/test/Feature/constexprbad.ll b/test/Feature/constexprbad.ll index cbec98a417e..ed90747b8ca 100644 --- a/test/Feature/constexprbad.ll +++ b/test/Feature/constexprbad.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; This testcase is for testing illegal constant expressions. ; Uncomment any code line below to test that the error is caught ; See constexpr.ll in this directory for legal ones. diff --git a/test/Feature/constpointer.ll b/test/Feature/constpointer.ll index dcf704a4390..9a876d2cedb 100644 --- a/test/Feature/constpointer.ll +++ b/test/Feature/constpointer.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; This testcase is primarily used for testing that global values can be used as ; constant pointer initializers. This is tricky because they can be forward ; declared and involves an icky bytecode encoding. There is no meaningful diff --git a/test/Feature/dg.exp b/test/Feature/dg.exp new file mode 100644 index 00000000000..73892689f31 --- /dev/null +++ b/test/Feature/dg.exp @@ -0,0 +1,4 @@ +load_lib llvm-dg.exp + +llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext + diff --git a/test/Feature/forwardreftest.ll b/test/Feature/forwardreftest.ll index bd6ba086da4..4569ee2b30b 100644 --- a/test/Feature/forwardreftest.ll +++ b/test/Feature/forwardreftest.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %myty = type int %myfn = type float (int,double,uint,short) type int(%myfn*) diff --git a/test/Feature/globalredefinition.ll b/test/Feature/globalredefinition.ll index 793554a2c79..8e5bbe24ba4 100644 --- a/test/Feature/globalredefinition.ll +++ b/test/Feature/globalredefinition.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; Test forward references and redefinitions of globals %Y = global void()* %X diff --git a/test/Feature/globalvars.ll b/test/Feature/globalvars.ll index ae969af8ec3..0b20c1b7736 100644 --- a/test/Feature/globalvars.ll +++ b/test/Feature/globalvars.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %MyVar = uninitialized global int %MyIntList = uninitialized global { \2 *, int } diff --git a/test/Feature/indirectcall.ll b/test/Feature/indirectcall.ll index b4d042fbd32..cdc2651e708 100644 --- a/test/Feature/indirectcall.ll +++ b/test/Feature/indirectcall.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation declare int "atoi"(sbyte *) diff --git a/test/Feature/indirectcall2.ll b/test/Feature/indirectcall2.ll index 4a12734cdfc..08e49ecd5e2 100644 --- a/test/Feature/indirectcall2.ll +++ b/test/Feature/indirectcall2.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation ulong "test"(ulong %X) diff --git a/test/Feature/intrinsics.ll b/test/Feature/intrinsics.ll index 16a23744cbb..12ecf49c723 100644 --- a/test/Feature/intrinsics.ll +++ b/test/Feature/intrinsics.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + declare bool %llvm.isunordered(float, float) declare bool %llvm.isunordered(double, double) diff --git a/test/Feature/opaquetypes.ll b/test/Feature/opaquetypes.ll index 271493f222a..1873a00af9e 100644 --- a/test/Feature/opaquetypes.ll +++ b/test/Feature/opaquetypes.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; This test case is used to test opaque type processing, forward references, ; and recursive types. Oh my. ; diff --git a/test/Feature/packed.ll b/test/Feature/packed.ll index bc355ab355f..bc50d26015f 100755 --- a/test/Feature/packed.ll +++ b/test/Feature/packed.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; RUN: llvm-as < %s | llvm-dis %foo1 = uninitialized global <4 x float>; diff --git a/test/Feature/properties.ll b/test/Feature/properties.ll index d73d936654d..fc88f239dc2 100644 --- a/test/Feature/properties.ll +++ b/test/Feature/properties.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + target endian = little target pointersize = 32 diff --git a/test/Feature/prototype.ll b/test/Feature/prototype.ll index 6874ca6b53d..a97f8129b13 100644 --- a/test/Feature/prototype.ll +++ b/test/Feature/prototype.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation declare int "bar"(int %in) diff --git a/test/Feature/recursivetype.ll b/test/Feature/recursivetype.ll index 13a2094d3f3..29fb93c8142 100644 --- a/test/Feature/recursivetype.ll +++ b/test/Feature/recursivetype.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; This file contains the output from the following compiled C code: ; typedef struct list { ; struct list *Next; diff --git a/test/Feature/simplecalltest.ll b/test/Feature/simplecalltest.ll index 1ac9fe36303..37fa6c62ab2 100644 --- a/test/Feature/simplecalltest.ll +++ b/test/Feature/simplecalltest.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %FunTy = type int(int) implementation diff --git a/test/Feature/small.ll b/test/Feature/small.ll index 59e6b1197c0..5d80e2003a7 100644 --- a/test/Feature/small.ll +++ b/test/Feature/small.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %x = type int implementation diff --git a/test/Feature/smallest.ll b/test/Feature/smallest.ll index 6c5db17425d..a7ad71c3849 100644 --- a/test/Feature/smallest.ll +++ b/test/Feature/smallest.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation diff --git a/test/Feature/testalloca.ll b/test/Feature/testalloca.ll index d6af922db5a..ac08be60e22 100644 --- a/test/Feature/testalloca.ll +++ b/test/Feature/testalloca.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %inners = type {float, {ubyte } } %struct = type { int , {float, {ubyte } } , ulong } diff --git a/test/Feature/testconstants.ll b/test/Feature/testconstants.ll index df525f51f36..49d2d152ae1 100644 --- a/test/Feature/testconstants.ll +++ b/test/Feature/testconstants.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %somestr = constant [11x sbyte] c"hello world" %array = constant [2 x int] [ int 12, int 52 ] constant { int, int } { int 4, int 3 } diff --git a/test/Feature/testlogical.ll b/test/Feature/testlogical.ll index d1f8c2516a6..97452b4557e 100644 --- a/test/Feature/testlogical.ll +++ b/test/Feature/testlogical.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation int "simpleAdd"(int %i0, int %j0) diff --git a/test/Feature/testmemory.ll b/test/Feature/testmemory.ll index fca4532fae1..cc6fe710195 100644 --- a/test/Feature/testmemory.ll +++ b/test/Feature/testmemory.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %struct = type { int , {float, {ubyte } } , ulong } %complexty = type {int, {[4 x sbyte *], float}, double} diff --git a/test/Feature/testswitch.ll b/test/Feature/testswitch.ll index e5190d05850..484ff2abc16 100644 --- a/test/Feature/testswitch.ll +++ b/test/Feature/testswitch.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %int = type int implementation diff --git a/test/Feature/testvarargs.ll b/test/Feature/testvarargs.ll index ef6e48f8843..5806f2899ac 100644 --- a/test/Feature/testvarargs.ll +++ b/test/Feature/testvarargs.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation declare int "printf"(sbyte*, ...) ;; Prototype for: int __builtin_printf(const char*, ...) diff --git a/test/Feature/undefined.ll b/test/Feature/undefined.ll index a71b906dcc0..cdbec03d398 100644 --- a/test/Feature/undefined.ll +++ b/test/Feature/undefined.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + %X = global int undef diff --git a/test/Feature/unreachable.ll b/test/Feature/unreachable.ll index 84c4552a627..de7beb93aeb 100644 --- a/test/Feature/unreachable.ll +++ b/test/Feature/unreachable.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + implementation diff --git a/test/Feature/varargs.ll b/test/Feature/varargs.ll index bf0c6f2ac6f..d75a49d8edf 100644 --- a/test/Feature/varargs.ll +++ b/test/Feature/varargs.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; Demonstrate all of the variable argument handling intrinsic functions plus ; the va_arg instruction. diff --git a/test/Feature/weirdnames.ll b/test/Feature/weirdnames.ll index 710905f6d0e..c8a45c34a6d 100644 --- a/test/Feature/weirdnames.ll +++ b/test/Feature/weirdnames.ll @@ -1,3 +1,7 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + ; Test using double quotes to form names that are not legal in the % form "&^ " = type { int }