mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-28 22:20:43 +00:00
FileCheckize some tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
344cfb4db4
commit
b4be7f6b04
@ -1,4 +1,6 @@
|
||||
// RUN: llvm-tblgen %s | grep -- 4294901760
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: 4294901760
|
||||
|
||||
def X {
|
||||
int Y = 0xFFFF0000;
|
||||
|
@ -1,4 +1,10 @@
|
||||
// RUN: llvm-tblgen %s | grep "zing = 4" | count 4
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK-NOT: zing = 4
|
||||
|
||||
class C1<int A, string B> {
|
||||
int bar = A;
|
||||
|
@ -1,4 +1,7 @@
|
||||
// RUN: llvm-tblgen %s | grep ADDPSrr | count 1
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: ADDPSrr
|
||||
// CHECK-NOT: ADDPSrr
|
||||
|
||||
class Instruction<bits<4> opc, string Name> {
|
||||
bits<4> opcode = opc;
|
||||
|
@ -1,4 +1,6 @@
|
||||
// RUN: llvm-tblgen %s | grep "int Y = 3"
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: int Y = 3
|
||||
|
||||
class C {
|
||||
int X = 4;
|
||||
|
@ -1,4 +1,9 @@
|
||||
// RUN: llvm-tblgen %s | grep "bit IsDouble = 1;" | count 3
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: bit IsDouble = 1;
|
||||
// CHECK: bit IsDouble = 1;
|
||||
// CHECK: bit IsDouble = 1;
|
||||
// CHECK-NOT: bit IsDouble = 1;
|
||||
|
||||
class Instruction<bits<4> opc, string Name> {
|
||||
bits<4> opcode = opc;
|
||||
|
@ -1,6 +1,4 @@
|
||||
// RUN llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// RUN: llvm-tblgen %s | grep "foo" | count 1
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
class Base<string t> {
|
||||
string text = t;
|
||||
@ -11,3 +9,4 @@ class Derived<list<list<string>> thetext> : Base<thetext[0][0]>;
|
||||
def FOO : Derived<[["foo"]]>;
|
||||
|
||||
// CHECK: text = "foo"
|
||||
// CHECK-NOT: text = "foo"
|
||||
|
@ -1,4 +1,8 @@
|
||||
// RUN: llvm-tblgen %s | grep "zing = 4" | count 2
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK-NOT: zing = 4
|
||||
|
||||
class C1<int A, string B> {
|
||||
int bar = A;
|
||||
|
@ -1,4 +1,7 @@
|
||||
// RUN: llvm-tblgen %s | grep WorldHelloCC | count 1
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: WorldHelloCC
|
||||
// CHECK-NOT: WorldHelloCC
|
||||
|
||||
class C<string n> {
|
||||
string name = n;
|
||||
|
@ -1,4 +1,35 @@
|
||||
// RUN: llvm-tblgen %s | grep "zing = 4" | count 28
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// "zing = 4" x 28
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK: zing = 4
|
||||
// CHECK-NOT: zing = 4
|
||||
|
||||
class C1<int A, string B> {
|
||||
int bar = A;
|
||||
|
@ -1,5 +1,10 @@
|
||||
// RUN: llvm-tblgen %s | grep '\[(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))\]' | count 1
|
||||
// RUN: llvm-tblgen %s | grep '\[(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))\]' | count 1
|
||||
// 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_ps VR128:$src1, VR128:$src2))]
|
||||
// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))]
|
||||
|
||||
class ValueType<int size, int value> {
|
||||
int Size = size;
|
||||
|
@ -1,4 +1,9 @@
|
||||
// RUN: llvm-tblgen %s | grep "add_ps" | count 3
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: add_ps
|
||||
// CHECK: add_ps
|
||||
// CHECK: add_ps
|
||||
// CHECK-NOT: add_ps
|
||||
|
||||
class ValueType<int size, int value> {
|
||||
int Size = size;
|
||||
|
@ -1,6 +1,13 @@
|
||||
// RUN: llvm-tblgen %s | grep 'Jr' | count 2
|
||||
// RUN: llvm-tblgen %s | grep 'Sr' | count 2
|
||||
// RUN: llvm-tblgen %s | grep '"NAME"' | count 1
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: Classes
|
||||
// CHECK: Sr
|
||||
// CHECK: Jr
|
||||
// CHECK: "NAME"
|
||||
|
||||
// CHECK: Defs
|
||||
// CHECK: Jr
|
||||
// CHECK: Sr
|
||||
|
||||
// Variables for foreach
|
||||
class decls {
|
||||
|
@ -1,4 +1,19 @@
|
||||
// RUN: llvm-tblgen %s | grep ""
|
||||
// RUN: llvm-tblgen %s
|
||||
|
||||
// CHECK: def One {
|
||||
// CHECK-NEXT: list<string> names = ["Jeffrey Sinclair"];
|
||||
// CHECK-NEXT: string element = "Jeffrey Sinclair";
|
||||
// CHECK-NEXT: list<string> rest = [];
|
||||
// CHECK-NEXT: int null = 1;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def Three {
|
||||
// CHECK-NEXT: list<string> names = ["Tom", "Dick", "Harry"];
|
||||
// CHECK-NEXT: string element = "Tom";
|
||||
// CHECK-NEXT: list<string> rest = ["Dick", "Harry"];
|
||||
// CHECK-NEXT: int null = 0;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
|
||||
class List<list<string> n> {
|
||||
list<string> names = n;
|
||||
|
@ -1,4 +1,6 @@
|
||||
// RUN: llvm-tblgen %s | grep fufoo
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
// CHECK: fufoo
|
||||
|
||||
class Y<string S> {
|
||||
string T = !strconcat(S, "foo");
|
||||
|
@ -1,9 +1,4 @@
|
||||
// RUN: llvm-tblgen %s | grep "Smith" | count 7
|
||||
// RUN: llvm-tblgen %s | grep "Johnson" | count 2
|
||||
// RUN: llvm-tblgen %s | grep "FIRST" | count 1
|
||||
// RUN: llvm-tblgen %s | grep "LAST" | count 1
|
||||
// RUN: llvm-tblgen %s | grep "TVAR" | count 2
|
||||
// RUN: llvm-tblgen %s | grep "Bogus" | count 1
|
||||
// RUN: llvm-tblgen %s | FileCheck %s
|
||||
|
||||
class Honorific<string t> {
|
||||
string honorific = t;
|
||||
@ -27,3 +22,56 @@ def JohnSmith : AName<"FIRST LAST", TVAR>;
|
||||
def JaneSmith : AName<"Jane LAST", Ms>;
|
||||
def JohnSmithJones : AName<"FIRST LAST-Jones", Mr>;
|
||||
def JimmyJohnson : AName<"Jimmy Johnson", Mr>;
|
||||
|
||||
// CHECK: ------------- Classes -----------------
|
||||
// CHECK-NEXT: class AName<string AName:name = ?, Honorific AName:honorific = ?> {
|
||||
// CHECK-NEXT: string name = !subst("FIRST", "John", !subst("LAST", "Smith", AName:name));
|
||||
// CHECK-NEXT: Honorific honorific = !subst(TVAR, Mr, AName:honorific);
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: class Honorific<string Honorific:t = ?> {
|
||||
// CHECK-NEXT: string honorific = Honorific:t;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: class Name<string Name:n = ?, Honorific Name:t = ?> {
|
||||
// CHECK-NEXT: string name = Name:n;
|
||||
// CHECK-NEXT: Honorific honorific = Name:t;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ------------- Defs -----------------
|
||||
// CHECK-NEXT: def JaneSmith {
|
||||
// CHECK-NEXT: string name = "Jane Smith";
|
||||
// CHECK-NEXT: Honorific honorific = Ms;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def JimmyJohnson {
|
||||
// CHECK-NEXT: string name = "Jimmy Johnson";
|
||||
// CHECK-NEXT: Honorific honorific = Mr;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def JohnSmith {
|
||||
// CHECK-NEXT: string name = "John Smith";
|
||||
// CHECK-NEXT: Honorific honorific = Mr;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def JohnSmithJones {
|
||||
// CHECK-NEXT: string name = "John Smith-Jones";
|
||||
// CHECK-NEXT: Honorific honorific = Mr;
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def Mr
|
||||
// CHECK-NEXT: string honorific = "Mr.";
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def Mrs {
|
||||
// CHECK-NEXT: string honorific = "Mrs.";
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def Ms {
|
||||
// CHECK-NEXT: string honorific = "Ms.";
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: def TVAR {
|
||||
// CHECK-NEXT: string honorific = "Bogus";
|
||||
// CHECK-NEXT: string NAME = ?;
|
||||
// CHECK-NEXT: }
|
||||
|
Loading…
Reference in New Issue
Block a user