summaryrefslogtreecommitdiffstats
path: root/test/TableGen
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 19:34:23 +0000
committerdim <dim@FreeBSD.org>2012-08-15 19:34:23 +0000
commit721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch)
treeeacfc83d988e4b9d11114387ae7dc41243f2a363 /test/TableGen
parent2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff)
downloadFreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip
FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/DefmInherit.td2
-rw-r--r--test/TableGen/ForeachLoop.td22
-rw-r--r--test/TableGen/LazyChange.td2
-rw-r--r--test/TableGen/ListOfList.td2
-rw-r--r--test/TableGen/MultiClass.td2
-rw-r--r--test/TableGen/MultiClassInherit.td2
-rw-r--r--test/TableGen/SetTheory.td2
-rw-r--r--test/TableGen/Slice.td4
-rw-r--r--test/TableGen/TargetInstrSpec.td4
-rw-r--r--test/TableGen/cast.td2
-rw-r--r--test/TableGen/foreach.td6
-rw-r--r--test/TableGen/lisp.td2
-rw-r--r--test/TableGen/subst.td12
13 files changed, 43 insertions, 21 deletions
diff --git a/test/TableGen/DefmInherit.td b/test/TableGen/DefmInherit.td
index 47fd81d..46d3f62 100644
--- a/test/TableGen/DefmInherit.td
+++ b/test/TableGen/DefmInherit.td
@@ -1,4 +1,4 @@
-// RUN: llvm-tblgen %s | grep {zing = 4} | count 4
+// RUN: llvm-tblgen %s | grep "zing = 4" | count 4
// XFAIL: vg_leak
class C1<int A, string B> {
diff --git a/test/TableGen/ForeachLoop.td b/test/TableGen/ForeachLoop.td
index e2defe9..4aacc74 100644
--- a/test/TableGen/ForeachLoop.td
+++ b/test/TableGen/ForeachLoop.td
@@ -6,10 +6,19 @@ class Register<string name, int idx> {
int Index = idx;
}
+// CHECK-NOT: !strconcat
+
+foreach i = 0-3 in
+ def Q#i : Register<"Q"#i, i>;
+
+// CHECK: def Q0
+// CHECK: def Q1
+// CHECK: def Q2
+// CHECK: def Q3
+
foreach i = [0, 1, 2, 3, 4, 5, 6, 7] in
def R#i : Register<"R"#i, i>;
-
// CHECK: def R0
// CHECK: string Name = "R0";
// CHECK: int Index = 0;
@@ -41,3 +50,14 @@ foreach i = [0, 1, 2, 3, 4, 5, 6, 7] in
// CHECK: def R7
// CHECK: string Name = "R7";
// CHECK: int Index = 7;
+
+foreach i = {0-3,9-7} in
+ def S#i : Register<"Q"#i, i>;
+
+// CHECK: def S0
+// CHECK: def S1
+// CHECK: def S2
+// CHECK: def S3
+// CHECK: def S7
+// CHECK: def S8
+// CHECK: def S9
diff --git a/test/TableGen/LazyChange.td b/test/TableGen/LazyChange.td
index 8145a3f..306959e 100644
--- a/test/TableGen/LazyChange.td
+++ b/test/TableGen/LazyChange.td
@@ -1,4 +1,4 @@
-// RUN: llvm-tblgen %s | grep {int Y = 3}
+// RUN: llvm-tblgen %s | grep "int Y = 3"
// XFAIL: vg_leak
class C {
diff --git a/test/TableGen/ListOfList.td b/test/TableGen/ListOfList.td
index 565a99c..864401e 100644
--- a/test/TableGen/ListOfList.td
+++ b/test/TableGen/ListOfList.td
@@ -1,6 +1,6 @@
// RUN llvm-tblgen %s | FileCheck %s
-// RUN: llvm-tblgen %s | grep {foo} | count 1
+// RUN: llvm-tblgen %s | grep "foo" | count 1
// XFAIL: vg_leak
class Base<string t> {
diff --git a/test/TableGen/MultiClass.td b/test/TableGen/MultiClass.td
index 04f3a56..449c5d6 100644
--- a/test/TableGen/MultiClass.td
+++ b/test/TableGen/MultiClass.td
@@ -1,4 +1,4 @@
-// RUN: llvm-tblgen %s | grep {zing = 4} | count 2
+// RUN: llvm-tblgen %s | grep "zing = 4" | count 2
// XFAIL: vg_leak
class C1<int A, string B> {
diff --git a/test/TableGen/MultiClassInherit.td b/test/TableGen/MultiClassInherit.td
index 8b78bc7..c768fff 100644
--- a/test/TableGen/MultiClassInherit.td
+++ b/test/TableGen/MultiClassInherit.td
@@ -1,4 +1,4 @@
-// RUN: llvm-tblgen %s | grep {zing = 4} | count 28
+// RUN: llvm-tblgen %s | grep "zing = 4" | count 28
// XFAIL: vg_leak
class C1<int A, string B> {
diff --git a/test/TableGen/SetTheory.td b/test/TableGen/SetTheory.td
index 4d85aa3..7613323 100644
--- a/test/TableGen/SetTheory.td
+++ b/test/TableGen/SetTheory.td
@@ -161,10 +161,12 @@ def S9a : Set<(sequence "e%u", 3, 7)>;
def S9b : Set<(sequence "e%u", 7, 3)>;
def S9c : Set<(sequence "e%u", 0, 0)>;
def S9d : Set<(sequence "S%ua", 7, 9)>;
+def S9e : Set<(sequence "e%u", 3, 6, 2)>;
// CHECK: S9a = [ e3 e4 e5 e6 e7 ]
// CHECK: S9b = [ e7 e6 e5 e4 e3 ]
// CHECK: S9c = [ e0 ]
// CHECK: S9d = [ a b c d e0 e3 e6 e9 e4 e5 e7 ]
+// CHECK: S9e = [ e3 e5 ]
// The 'interleave' operator is almost the inverse of 'decimate'.
def interleave;
diff --git a/test/TableGen/Slice.td b/test/TableGen/Slice.td
index 2d2822c..6d051d7 100644
--- a/test/TableGen/Slice.td
+++ b/test/TableGen/Slice.td
@@ -1,5 +1,5 @@
-// RUN: llvm-tblgen %s | grep {\\\[(set} | count 2
-// RUN: llvm-tblgen %s | grep {\\\[\\\]} | count 2
+// RUN: llvm-tblgen %s | grep "\[(set" | count 2
+// RUN: llvm-tblgen %s | grep "\[\]" | count 2
// XFAIL: vg_leak
class ValueType<int size, int value> {
diff --git a/test/TableGen/TargetInstrSpec.td b/test/TableGen/TargetInstrSpec.td
index 7b611e7..64b706d 100644
--- a/test/TableGen/TargetInstrSpec.td
+++ b/test/TableGen/TargetInstrSpec.td
@@ -1,5 +1,5 @@
-// 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 | 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
// XFAIL: vg_leak
class ValueType<int size, int value> {
diff --git a/test/TableGen/cast.td b/test/TableGen/cast.td
index 8a23eb4..7948aff 100644
--- a/test/TableGen/cast.td
+++ b/test/TableGen/cast.td
@@ -1,4 +1,4 @@
-// RUN: llvm-tblgen %s | grep {add_ps} | count 3
+// RUN: llvm-tblgen %s | grep "add_ps" | count 3
// XFAIL: vg_leak
class ValueType<int size, int value> {
diff --git a/test/TableGen/foreach.td b/test/TableGen/foreach.td
index 814ae6e..902af25 100644
--- a/test/TableGen/foreach.td
+++ b/test/TableGen/foreach.td
@@ -1,6 +1,6 @@
-// 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 | grep 'Jr' | count 2
+// RUN: llvm-tblgen %s | grep 'Sr' | count 2
+// RUN: llvm-tblgen %s | grep '"NAME"' | count 1
// XFAIL: vg_leak
// Variables for foreach
diff --git a/test/TableGen/lisp.td b/test/TableGen/lisp.td
index 025aca9..dd85ddc 100644
--- a/test/TableGen/lisp.td
+++ b/test/TableGen/lisp.td
@@ -1,4 +1,4 @@
-// RUN: llvm-tblgen %s | grep {}
+// RUN: llvm-tblgen %s | grep ""
// XFAIL: vg_leak
class List<list<string> n> {
diff --git a/test/TableGen/subst.td b/test/TableGen/subst.td
index 5a73ec4..850ac38 100644
--- a/test/TableGen/subst.td
+++ b/test/TableGen/subst.td
@@ -1,9 +1,9 @@
-// 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 | 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
// XFAIL: vg_leak
class Honorific<string t> {
OpenPOWER on IntegriCloud