For PR1319: Upgrade to new test harness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-04-15 20:08:37 +00:00
parent fe560b8c85
commit dcb925e917
31 changed files with 74 additions and 55 deletions

View File

@ -1,4 +1,4 @@
/* RUN: %llvmgcc -xc %s -c -o - | dis | not grep cast
/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep cast
*/
void test(int* array, long long N) {

View File

@ -1,4 +1,4 @@
/* RUN: %llvmgcc -xc %s -c -o - | dis | not grep __builtin_
/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_
*
* __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp
* just like explicit setjmp/longjmp calls are.

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep 'llvm.*address' | wc -l | grep 4
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | wc -l | grep 4
void *test1() {
return __builtin_return_address(1);

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -o - | not grep 'foo\* sub'
// RUN: %llvmgcc %s -S -o - | not grep {foo\\* sub}
// This should not produce a subtrace constantexpr of a pointer
struct foo {
int Y;

View File

@ -1,4 +1,5 @@
// RUN: %llvmgcc -S 2004-11-27-StaticFunctionRedeclare.c -o - | gccas | llvm-dis | not grep 'declare int.*func'
// RUN: %llvmgcc -c -emit-llvm 2004-11-27-StaticFunctionRedeclare.c -o - | \
// RUN: opt -std-compile-opts | llvm-dis | not grep {declare int.*func}
// There should not be an unresolved reference to func here. Believe it or not,
// the "expected result" is a function named 'func' which is internal and

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc -xc %s -S -o - | grep 'internal constant '
// RUN: %llvmgcc -xc %s -S -o - | grep {internal constant }
// The synthetic global made by the CFE for big initializer should be marked
// constant.

View File

@ -1,4 +1,3 @@
// RUN: %llvmgcc %s -S -o - && \
// RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null -f
const double _Complex x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

View File

@ -1,6 +1,4 @@
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts &&
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc &&
// RUN: %llvmgcc %s -S -o - | llvm-as | llc -std-compile-opts | llc | \
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc | \
// RUN: not grep _foo2
void foo() __asm__("foo2");

View File

@ -1,4 +1,5 @@
// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X
// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | \
// RUN: grep llvm.used | grep foo | grep X
int X __attribute__((used));
int Y;

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -g -o - | grep 'llvm.dbg.stoppoint.*i32 14'
// RUN: %llvmgcc %s -S -g -o - | grep {llvm.dbg.stoppoint.*i32 14}
// PR664: ensure that line #'s are emitted for declarations

View File

@ -1,5 +1,4 @@
// RUN: %llvmgcc -S %s -o - | grep 'llvm.ctlz.i32(i32'
// RUNMEIFWEHADSIGNEDTYPES: %llvmgcc -S %s -o - | not grep 'llvm.ctlz.i32(i32'
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | wc -l | grep 2
unsigned t2(unsigned X) {
return __builtin_clz(X);

View File

@ -1,5 +1,5 @@
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
// RUN: llvm-dis | grep foo[12345] | wc -l | grep 5
// RUN: llvm-dis | grep {foo\[12345\]} | wc -l | grep 5
__asm__ ("foo1");
__asm__ ("foo2");

View File

@ -1,5 +1,5 @@
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
// RUN: llvm-dis | grep '@nate.*internal global i32 0'
// RUN: llvm-dis | grep {@nate.*internal global i32 0}
struct X { int *XX; int Y;};

View File

@ -1,6 +1,5 @@
// RUN: %llvmgcc %s -S -o /dev/null &&
// RUN: %llvmgcc %s -S -o - | grep 'ext: xorl %eax, eax; movl' &&
// RUN: %llvmgcc %s -S -o - | grep 'nonext: xorl %eax, %eax; mov'
// RUN: %llvmgcc %s -S -o - | grep {ext: xorl %eax, eax; movl}
// RUN: %llvmgcc %s -S -o - | grep {nonext: xorl %eax, %eax; mov}
// PR924
void bar() {

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc -O3 -S %s -o - | grep 'fcmp ord float %X, %Y'
// RUN: %llvmgcc -O3 -S %s -o - | grep {fcmp ord float %X, %Y}
int test2(float X, float Y) {
return !__builtin_isunordered(X, Y);

View File

@ -1,5 +1,6 @@
// Verify that the %c modifier works and strips off any prefixes from immediates.
// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep 'pickANumber: 789514'
// Verify that the %c modifier works and strips off any prefixes from
// immediates.
// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep {pickANumber: 789514}
void foo() {
__asm__ volatile("/* " "pickANumber" ": %c0 */"::"i"(0xC0C0A));

View File

@ -1,7 +1,8 @@
// Test the -fwritable-strings option.
// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | grep 'internal global' &&
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep 'internal constant'
// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
// RUN: grep {internal global}
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {internal constant}
char *X = "foo";

View File

@ -1,4 +1,5 @@
// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | grep 'call float @foo'
// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | \
// RUN: grep {call float @foo}
// Make sure the call to foo is compiled as:
// call float @foo()

View File

@ -1,6 +1,7 @@
// Testcase for PR1242
// RUN: %llvmgcc -S %s -o - | grep datalayout | \
// RUN: not grep '"[Ee]-p:[36][24]:[36][24]"'
// RUN: not grep {"\[Ee\]-p:\[36\]\[24\]:\[36\]\[24\]"}
// END.
#include <stdlib.h>
#define NDIM 3
#define BODY 01

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm'
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call i32 asm}
struct V { short X, Y; };
int bar() {

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm'
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call i32 asm}
union U { int x; char* p; };
void foo() {

View File

@ -1,10 +1,19 @@
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | grep weak | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | grep weak | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xWeaknoinline | grep weak wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xWeakextnoinline | grep weak wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | grep xextnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | \
// RUN: grep weak | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | \
// RUN: grep weak | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xglobnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | \
// RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;

View File

@ -1,10 +1,19 @@
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | grep xglobWeak | grep extern_weak | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | grep weak | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xWeaknoinline | grep weak wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xWeakextnoinline | grep weak wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | grep xglobnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xextnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
// RUN: grep xglobWeak | grep extern_weak | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xextWeak | grep weak | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
// RUN: grep xglobnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
struct V { short X, Y; };
int bar() {

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
union U { int x; char* p; };
void foo() {

View File

@ -1,5 +1,4 @@
// RUN: %llvmgcc -S %s -o - /dev/null 2>&1 > /dev/null | \
// RUN: not grep warning
// RUN: ignore %llvmgcc -S %s -o - /dev/null |& not grep warning
// XFAIL: *
#define ATTR_BITS(N) __attribute__((bitwidth(N)))

View File

@ -1,5 +1,6 @@
// RUN: %llvmgcc -S %s -o - | grep 'trunc.*to bool'
// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | grep 'test.*1'
// RUN: %llvmgcc -S %s -o - | grep {trunc.*to i8}
// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | \
// RUN: grep {test.*1}
int
main ( int argc, char** argv)
{

View File

@ -1,3 +1,3 @@
load_lib llvm-dg.exp
load_lib llvm.exp
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]

View File

@ -1,5 +1,5 @@
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak &&
// RUN: %llvmgcc -O3 -S -o - -emit-llvm | llvm-as | llc
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
void foo() __attribute__((weak_import));

View File

@ -1,3 +1,3 @@
// RUN: %llvmgcc %s -emit-llvm -S -o - | grep 'hidden global'
// RUN: %llvmgcc %s -emit-llvm -S -o - | grep {hidden global}
int X __attribute__ ((__visibility__ ("hidden"))) = 123;

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep 'sret' | wc -l | grep '5'
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | wc -l | grep 5
struct abc {
int a;
@ -12,4 +12,4 @@ struct abc foo2();
void bar() {
struct abc dummy1 = foo1();
struct abc dummy2 = foo2();
}
}