In historical reason, tblgen is not strictly required to be free from memory leaks.
For now, I mark them as XFAIL, they could be fixed, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194353
91177308-0d34-0410-b5e6-
96231b3b80d8
36 files changed:
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class A<int k, bits<2> x = 1> {
int K = k;
class A<int k, bits<2> x = 1> {
int K = k;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
//===----------------------------------------------------------------------===//
// Substitution of an int.
//===----------------------------------------------------------------------===//
// Substitution of an int.
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: zing = 4
// CHECK: zing = 4
// CHECK: zing = 4
// CHECK: zing = 4
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: ADDPSrr
// CHECK-NOT: ADDPSrr
// CHECK: ADDPSrr
// CHECK-NOT: ADDPSrr
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Register<string name, int idx> {
string Name = name;
class Register<string name, int idx> {
string Name = name;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Register<string name, int idx> {
string Name = name;
class Register<string name, int idx> {
string Name = name;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: bit IsDouble = 1;
// CHECK: bit IsDouble = 1;
// CHECK: bit IsDouble = 1;
// CHECK: bit IsDouble = 1;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Base<string t> {
string text = t;
class Base<string t> {
string text = t;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Base<list<int> v> {
list<int> values = v;
class Base<list<int> v> {
list<int> values = v;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: zing = 4
// CHECK: zing = 4
// CHECK: zing = 4
// CHECK: zing = 4
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: WorldHelloCC
// CHECK-NOT: WorldHelloCC
// CHECK: WorldHelloCC
// CHECK-NOT: WorldHelloCC
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// "zing = 4" x 28
// CHECK: zing = 4
// "zing = 4" x 28
// CHECK: zing = 4
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class ValueType<int size, int value> {
int Size = size;
class ValueType<int size, int value> {
int Size = size;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Droid<string series, int release, string model, int patchlevel> {
string Series = series;
class Droid<string series, int release, string model, int patchlevel> {
string Series = series;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Instr<int i> {
int index = i;
class Instr<int i> {
int index = i;
// Test evaluation of set operations in dags.
// RUN: llvm-tblgen -print-sets %s | FileCheck %s
// Test evaluation of set operations in dags.
// RUN: llvm-tblgen -print-sets %s | FileCheck %s
//
// The -print-sets driver configures a primitive SetTheory instance that
// understands these sets:
//
// The -print-sets driver configures a primitive SetTheory instance that
// understands these sets:
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Set<int i = 0, int j = 0, int k = 0> {
int I = i;
class Set<int i = 0, int j = 0, int k = 0> {
int I = i;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class ValueType<int size, int value> {
int Size = size;
class ValueType<int size, int value> {
int Size = size;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
// CHECK: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Type<string name, int length, int width> {
string Name = name;
class Type<string name, int length, int width> {
string Name = name;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: add_ps
// CHECK: add_ps
// CHECK: add_ps
// CHECK: add_ps
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class XD { bits<4> Prefix = 11; }
// CHECK: Prefix = { 1, 1, 0, 0 };
class XD { bits<4> Prefix = 11; }
// CHECK: Prefix = { 1, 1, 0, 0 };
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: Value = 0
// CHECK: Value = 1
// CHECK: Value = 0
// CHECK: Value = 1
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: a = 6
// CHECK: a = 5
// CHECK: a = 6
// CHECK: a = 5
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: Classes
// CHECK: Sr
// CHECK: Classes
// CHECK: Sr
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// Support for an `!if' operator as part of a `let' statement.
// CHECK: class C
// Support for an `!if' operator as part of a `let' statement.
// CHECK: class C
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: a = 6
// CHECK: a = 5
// CHECK: a = 6
// CHECK: a = 5
// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
// CHECK: def One {
// CHECK-NEXT: list<string> names = ["Jeffrey Sinclair"];
// CHECK: def One {
// CHECK-NEXT: list<string> names = ["Jeffrey Sinclair"];
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class C<list<bits<8>> L> {
bits<2> V0 = L[0]{1-0};
class C<list<bits<8>> L> {
bits<2> V0 = L[0]{1-0};
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Int<int value> {
int Value = value;
class Int<int value> {
int Value = value;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Or4<bits<8> Val> {
bits<8> V = {Val{7}, Val{6}, Val{5}, Val{4}, Val{3}, 1, Val{1}, Val{0} };
class Or4<bits<8> Val> {
bits<8> V = {Val{7}, Val{6}, Val{5}, Val{4}, Val{3}, 1, Val{1}, Val{0} };
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Honorific<string t> {
string honorific = t;
class Honorific<string t> {
string honorific = t;
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
// CHECK: No subst
// CHECK: No foo
// CHECK: RECURSE foo
// CHECK: No subst
// CHECK: No foo
// CHECK: RECURSE foo
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: llvm-tblgen %s | FileCheck %s
class Instr<list<dag> pat> {
list<dag> Pattern = pat;
class Instr<list<dag> pat> {
list<dag> Pattern = pat;