Remove tests that have been obsoleted or migrated to clang/optimizer tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2011-08-16 21:46:25 +00:00
parent 00c9a51888
commit f213ad1a55
19 changed files with 0 additions and 499 deletions

View File

@ -1,18 +0,0 @@
// RUN: %llvmgcc -g -S -O2 %s -o - | FileCheck %s
class foo {
public:
int bar(int x);
static int baz(int x);
};
int foo::bar(int x) {
// CHECK: {{i32 [0-9]+, i1 true(, i[0-9]+ [^\}]+[}]|[}]) ; \[ DW_TAG_subprogram \]}}
return x*4 + 1;
}
int foo::baz(int x) {
// CHECK: {{i32 [0-9]+, i1 true(, i[0-9]+ [^\},]+[}]|[}]) ; \[ DW_TAG_subprogram \]}}
return x*4 + 1;
}

View File

@ -1,43 +0,0 @@
// RUN: %llvmgcc -S -O0 -g %s -o /dev/null
// PR 7104
struct A {
int Ai;
};
struct B : public A {};
struct C : public B {};
const char * f(int C::*){ return ""; }
int f(int B::*) { return 1; }
struct D : public C {};
const char * g(int B::*){ return ""; }
int g(int D::*) { return 1; }
void test()
{
int i = f(&A::Ai);
const char * str = g(&A::Ai);
}
// conversion of B::* to C::* is better than conversion of A::* to C::*
typedef void (A::*pmfa)();
typedef void (B::*pmfb)();
typedef void (C::*pmfc)();
struct X {
operator pmfa();
operator pmfb();
};
void g(pmfc);
void test2(X x)
{
g(x);
}

View File

@ -1,31 +0,0 @@
// RUN: %llvmgxx -xc++ %s -S -o - | not grep ZN12basic_stringIcEC1Ev
// RUN: %llvmgxx -xc++ %s -S -o - | grep ZN12basic_stringIcED1Ev | count 2
template<class charT>
class basic_string
{
public:
basic_string();
~basic_string();
};
template <class charT>
__attribute__ ((__visibility__("hidden"), __always_inline__)) inline
basic_string<charT>::basic_string()
{
}
template <class charT>
inline
basic_string<charT>::~basic_string()
{
}
typedef basic_string<char> string;
extern template class basic_string<char>;
int main()
{
string s;
}

View File

@ -1,17 +0,0 @@
//RUN: %llvmgxx -O0 -S -g -o - %s | grep DW_TAG_auto_variable
class Foo
{
public:
int x;
int y;
Foo (int i, int j) { x = i; y = j; }
};
Foo foo(10, 11);
int main() {
int Foo::* pmi = &Foo::y;
return foo.*pmi;
}

View File

@ -1,13 +0,0 @@
// RUN: %llvmgxx -g -Os -S %s -o - | llvm-as -disable-output
// Do not use function name to create named metadata used to hold
// local variable info. For example. llvm.dbg.lv.~A is an invalid name.
class A {
public:
~A() { int i = 0; i++; }
};
int foo(int i) {
A a;
return 0;
}

View File

@ -1,20 +0,0 @@
// RUN: %llvmgxx -g -S %s
struct TEST2
{
int subid:32;
int :0;
};
typedef struct _TEST3
{
TEST2 foo;
TEST2 foo2;
} TEST3;
TEST3 test =
{
{0},
{0}
};
int main() { return 0; }

View File

@ -1,5 +0,0 @@
// RUN: %llvmgxx -g -S %s
struct s8_0 { unsigned : 0; };
struct s8_1 { double x; };
struct s8 { s8_0 a; s8_1 b; };
s8 f8() { return s8(); }

View File

@ -1,21 +0,0 @@
// RUN: %llvmgcc %s -S -m32 -fasm-blocks -o /dev/null
// This should not warn about unreferenced label. 8195660.
// XFAIL: *
// XTARGET: x86,i386,i686
void quarterAsm(int array[], int len)
{
__asm
{
mov esi, array;
mov ecx, len;
shr ecx, 2;
loop:
movdqa xmm0, [esi];
psrad xmm0, 2;
movdqa [esi], xmm0;
add esi, 16;
sub ecx, 1;
jnz loop;
}
}

View File

@ -1,86 +0,0 @@
// RUN: %llvmgxx -S -g %s -o - | FileCheck %s
// Require the template function declaration refer to the correct filename.
// First, locate the function decl in metadata, and pluck out the file handle:
// CHECK: {{extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*[^ ]+", metadata !}}[[filehandle:[0-9]+]],
// Second: Require that filehandle refer to the correct filename:
// CHECK: {{^!}}[[filehandle]] = metadata {{![{].*}} metadata !"decl_should_be_here.hpp",
typedef long unsigned int __darwin_size_t;
typedef __darwin_size_t size_t;
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
namespace std {
template<typename _Tp> class auto_ptr {
_Tp* _M_ptr;
public:
typedef _Tp element_type;
auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
element_type& operator*() const throw() { }
};
}
class Pointer32 {
public:
typedef uint32_t ptr_t;
typedef uint32_t size_t;
};
class Pointer64 {
public:
typedef uint64_t ptr_t;
typedef uint64_t size_t;
};
class BigEndian {};
class LittleEndian {};
template <typename _SIZE, typename _ENDIANNESS> class SizeAndEndianness {
public:
typedef _SIZE SIZE;
};
typedef SizeAndEndianness<Pointer32, LittleEndian> ISA32Little;
typedef SizeAndEndianness<Pointer32, BigEndian> ISA32Big;
typedef SizeAndEndianness<Pointer64, LittleEndian> ISA64Little;
typedef SizeAndEndianness<Pointer64, BigEndian> ISA64Big;
template <typename SIZE> class TRange {
protected:
typename SIZE::ptr_t _location;
typename SIZE::size_t _length;
TRange(typename SIZE::ptr_t location, typename SIZE::size_t length) : _location(location), _length(length) { }
};
template <typename SIZE, typename T> class TRangeValue : public TRange<SIZE> {
T _value;
public:
TRangeValue(typename SIZE::ptr_t location, typename SIZE::size_t length, T value) : TRange<SIZE>(location, length), _value(value) {};
};
template <typename SIZE> class TAddressRelocator {};
class CSCppSymbolOwner{};
class CSCppSymbolOwnerData{};
template <typename SIZE> class TRawSymbolOwnerData
{
TRangeValue< SIZE, uint8_t* > _TEXT_text_section;
const char* _dsym_path;
uint32_t _dylib_current_version;
uint32_t _dylib_compatibility_version;
public:
TRawSymbolOwnerData() :
_TEXT_text_section(0, 0, __null), _dsym_path(__null), _dylib_current_version(0), _dylib_compatibility_version(0) {}
};
template <typename SIZE_AND_ENDIANNESS> class TExtendedMachOHeader {};
# 16 "decl_should_be_here.hpp"
template <typename SIZE_AND_ENDIANNESS> void extract_dwarf_data_from_header(TExtendedMachOHeader<SIZE_AND_ENDIANNESS>& header,
TRawSymbolOwnerData<typename SIZE_AND_ENDIANNESS::SIZE>& symbol_owner_data,
TAddressRelocator<typename SIZE_AND_ENDIANNESS::SIZE>* address_relocator) {}
struct CSCppSymbolOwnerHashFunctor {
size_t operator()(const CSCppSymbolOwner& symbol_owner) const {
# 97 "wrong_place_for_decl.cpp"
}
};
template <typename SIZE_AND_ENDIANNESS> CSCppSymbolOwnerData* create_symbol_owner_data_arch_specific(CSCppSymbolOwner* symbol_owner, const char* dsym_path) {
typedef typename SIZE_AND_ENDIANNESS::SIZE SIZE;
std::auto_ptr< TRawSymbolOwnerData<SIZE> > data(new TRawSymbolOwnerData<SIZE>());
std::auto_ptr< TExtendedMachOHeader<SIZE_AND_ENDIANNESS> > header;
extract_dwarf_data_from_header(*header, *data, (TAddressRelocator<typename SIZE_AND_ENDIANNESS::SIZE>*)__null);
}
CSCppSymbolOwnerData* create_symbol_owner_data2(CSCppSymbolOwner* symbol_owner, const char* dsym_path) {
create_symbol_owner_data_arch_specific< ISA32Little >(symbol_owner, dsym_path);
create_symbol_owner_data_arch_specific< ISA32Big >(symbol_owner, dsym_path);
create_symbol_owner_data_arch_specific< ISA64Little >(symbol_owner, dsym_path);
create_symbol_owner_data_arch_specific< ISA64Big >(symbol_owner, dsym_path);
}

View File

@ -1,53 +0,0 @@
// This regression test checks byval arguments' debug info.
// Radar 8367011
// RUN: %llvmgcc -S -O0 -g %s -o - | \
// RUN: llc --disable-cfi --disable-fp-elim -o %t.s -O0 -relocation-model=pic
// RUN: %compile_c %t.s -o %t.o
// RUN: %link %t.o -o %t.exe
// RUN: echo {break get\nrun\np missing_arg.b} > %t.in
// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \
// RUN: grep {1 = 4242}
// XTARGET: x86_64-apple-darwin
class EVT {
public:
int a;
int b;
int c;
};
class VAL {
public:
int x;
int y;
};
void foo(EVT e);
EVT bar();
void get(int *i, unsigned dl, VAL v, VAL *p, unsigned n, EVT missing_arg) {
//CHECK: .ascii "missing_arg"
EVT e = bar();
if (dl == n)
foo(missing_arg);
}
EVT bar() {
EVT e;
return e;
}
void foo(EVT e) {}
int main(){
VAL v;
EVT ma;
ma.a = 1;
ma.b = 4242;
ma.c = 3;
int i = 42;
get (&i, 1, v, &v, 2, ma);
return 0;
}

View File

@ -1,23 +0,0 @@
// RUN: %llvmgxx %s -fasm-blocks -S -o - | FileCheck %s
// Complicated expression as jump target
// XFAIL: *
// XTARGET: x86,i386,i686,darwin
void Method3()
{
// CHECK: Method3
// CHECK-NOT: alignstack
asm("foo:");
// CHECK: return
}
void Method4()
{
// CHECK: Method4
// CHECK: alignstack
asm {
bar:
}
// CHECK: return
}

View File

@ -1,19 +0,0 @@
// RUN: %llvmgxx %s -O2 -S -o - | FileCheck %s
// This test verifies that we get expected codegen out of the -O2 optimization
// level from the full optimizer.
// Verify that ipsccp is running and can eliminate globals.
static int test1g = 42;
void test1f1() {
if (test1g == 0) test1g = 0;
}
int test1f2() {
return test1g;
}
// CHECK: @_Z7test1f2v()
// CHECK: entry:
// CHECK-NEXT: ret i32 42

View File

@ -1,19 +0,0 @@
// RUN: %llvmgxx %s -S -o - | FileCheck %s
// XFAIL: powerpc-apple-darwin
// Make sure pointers are passed as pointers, not converted to int.
// The first load should be of type i8** in either 32 or 64 bit mode.
// This formerly happened on x86-64, 7375899.
class StringRef {
public:
const char *Data;
long Len;
};
void foo(StringRef X);
void bar(StringRef &A) {
// CHECK: @_Z3barR9StringRef
// CHECK: load i8**
foo(A);
// CHECK: ret void
}

View File

@ -1,20 +0,0 @@
// RUN: %llvmgxx -S %s -o - | FileCheck %s
// XFAIL: arm,powerpc
// rdar://7268289
class t {
public:
virtual void foo(void);
void bar(void);
};
void
t::bar(void) {
// CHECK: _ZN1t3barEv{{.*}} align 2
}
void
t::foo(void) {
// CHECK: _ZN1t3fooEv{{.*}} align 2
}

View File

@ -1,15 +0,0 @@
// PR1602
// RUN: %llvmgxx -S %s -o - -O3 | not grep ptrtoint
// RUN: %llvmgxx -S %s -o - -O3 | not grep getelementptr
// RUN: %llvmgxx -S %s -o - -O3 | grep bitcast
struct S { virtual void f(); };
typedef void (S::*P)(void);
const P p = &S::f;
void g(S s) {
(s.*p)();
}

View File

@ -1,33 +0,0 @@
// RUN: %llvmgxx %s -S -o - | FileCheck %s
// <rdar://problem/7929157> & <rdar://problem/8104369>
struct A {
virtual int f() { return 1; }
};
struct B {
virtual int f() { return 2; }
};
struct C : A, B {
virtual int f() { return 3; }
};
struct D : C {
virtual int f() { return 4; }
};
static int f(D* d) {
B* b = d;
return b->f();
};
int g() {
D d;
return f(&d);
}
// Thunks should be marked as "linkonce ODR" not "weak".
//
// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1C1fEv
// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1D1fEv

View File

@ -1,19 +0,0 @@
// RUN: %llvmgxx -S %s -o - | FileCheck %s
// rdar://7309675
// PR4678
// test1 should be compmiled to be a varargs function in the IR even
// though there is no way to do a va_begin. Otherwise, the optimizer
// will warn about 'dropped arguments' at the call site.
// CHECK: define i32 @_Z5test1z(...)
int test1(...) {
return -1;
}
// CHECK: call i32 (...)* @_Z5test1z(i32 0)
void test() {
test1(0);
}

View File

@ -1,17 +0,0 @@
// RUN: %llvmgxx %s -S -O2 -o - | not grep {_ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag}
// PR4262
// The "basic_string" extern template instantiation declaration is supposed to
// suppress the implicit instantiation of non-inline member functions. Make sure
// that we suppress the implicit instantiation of non-inline member functions
// defined out-of-line. That we aren't instantiating the basic_string
// constructor when we shouldn't be. Such an instantiation forces the implicit
// instantiation of _S_construct<const char*>. Since _S_construct is a member
// template, it's instantiation is *not* suppressed (despite being in
// basic_string<char>), so we would emit it as a weak definition.
#include <stdexcept>
void dummysymbol() {
throw(std::runtime_error("string"));
}

View File

@ -1,27 +0,0 @@
// RUN: %llvmgxx -S %s -o - | grep byval | count 2
// XTARGET: x86
// PR4242
// (PR 4242 bug is on 64-bit only, test passes on x86-32 as well)
struct S {
void* data[3];
};
struct T {
void* data[2];
};
extern "C" S fail(int, int, int, int, T t, void* p) {
S s;
s.data[0] = t.data[0];
s.data[1] = t.data[1];
s.data[2] = p;
return s;
}
extern "C" S* succeed(S* sret, int, int, int, int, T t, void* p) {
sret->data[0] = t.data[0];
sret->data[1] = t.data[1];
sret->data[2] = p;
return sret;
}