diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
| commit | 58b69754af0cbff56b1cfce9be9392e4451f6628 (patch) | |
| tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /test/TableGen | |
| parent | 0378662f5bd3dbe8305a485b0282bceb8b52f465 (diff) | |
Notes
Diffstat (limited to 'test/TableGen')
| -rw-r--r-- | test/TableGen/DefmInherit.td | 2 | ||||
| -rw-r--r-- | test/TableGen/ForeachLoop.td | 22 | ||||
| -rw-r--r-- | test/TableGen/LazyChange.td | 2 | ||||
| -rw-r--r-- | test/TableGen/ListOfList.td | 2 | ||||
| -rw-r--r-- | test/TableGen/MultiClass.td | 2 | ||||
| -rw-r--r-- | test/TableGen/MultiClassInherit.td | 2 | ||||
| -rw-r--r-- | test/TableGen/SetTheory.td | 2 | ||||
| -rw-r--r-- | test/TableGen/Slice.td | 4 | ||||
| -rw-r--r-- | test/TableGen/TargetInstrSpec.td | 4 | ||||
| -rw-r--r-- | test/TableGen/cast.td | 2 | ||||
| -rw-r--r-- | test/TableGen/foreach.td | 6 | ||||
| -rw-r--r-- | test/TableGen/lisp.td | 2 | ||||
| -rw-r--r-- | test/TableGen/subst.td | 12 |
13 files changed, 43 insertions, 21 deletions
diff --git a/test/TableGen/DefmInherit.td b/test/TableGen/DefmInherit.td index 47fd81d2e719..46d3f62c6d04 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 e2defe9cfea6..4aacc74d8aa2 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 8145a3ff8d38..306959ebb6a2 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 565a99cf5fe2..864401ec3cd3 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 04f3a5655821..449c5d6c0403 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 8b78bc7736c3..c768fff0b670 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 4d85aa3e6f22..761332312b0f 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 2d2822c53b14..6d051d77c8a3 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 7b611e7c174d..64b706dc6a10 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 8a23eb4cc91f..7948aff79528 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 814ae6ef9363..902af25237e9 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 025aca961cd5..dd85ddc67c94 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 5a73ec4f1294..850ac38465c3 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> { |
