diff options
| author | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-02-22 15:26:28 +0000 |
|---|---|---|
| committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-02-22 15:26:28 +0000 |
| commit | e4a2cf5761fef90c228a2d90c6f1fefa986561c8 (patch) | |
| tree | a7c57853e05c190365854301660abdca2556fcc6 /llvm/test | |
| parent | f19083d1edb26c2cd4535ac58327f48667a88043 (diff) | |
| download | bcm5719-llvm-e4a2cf5761fef90c228a2d90c6f1fefa986561c8.tar.gz bcm5719-llvm-e4a2cf5761fef90c228a2d90c6f1fefa986561c8.zip | |
TableGen: Generalize type deduction for !listconcat
Summary:
This way, it should work even with complex operands.
Change-Id: Iaccf5bbb50bd5882a0ba5d59689e4381315fb361
Reviewers: arsenm, craig.topper, tra, MartinO
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D43554
llvm-svn: 325796
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/TableGen/listconcat.td | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/TableGen/listconcat.td b/llvm/test/TableGen/listconcat.td index 870e649d41d..26dce17e92d 100644 --- a/llvm/test/TableGen/listconcat.td +++ b/llvm/test/TableGen/listconcat.td @@ -1,18 +1,32 @@ // RUN: llvm-tblgen %s | FileCheck %s +// CHECK: class X<list<int> X:a = ?, list<int> X:b = ?, list<int> X:c = ?> { +// CHECK: list<int> x = !listconcat(!listconcat(X:a, X:b), !listconcat(X:b, X:c)); +// CHECK: } + // CHECK: class Y<list<string> Y:S = ?> { // CHECK: list<string> T1 = !listconcat(Y:S, ["foo"]); // CHECK: list<string> T2 = !listconcat(Y:S, !listconcat(["foo"], !listconcat(Y:S, ["bar", "baz"]))); // CHECK: } +// CHECK: def DX { +// CHECK: list<int> x = [0, 1, 1, 2] +// CHECK: } + // CHECK: def Z { // CHECK: list<string> T1 = ["fu", "foo"]; // CHECK: list<string> T2 = ["fu", "foo", "fu", "bar", "baz"]; // CHECK: } +class X<list<int> a, list<int> b, list<int> c> { + list<int> x = !listconcat(!listconcat(a, b), !listconcat(b, c)); +} + class Y<list<string> S> { list<string> T1 = !listconcat(S, ["foo"]); list<string> T2 = !listconcat(S, ["foo"], S, ["bar", "baz"]); } +def DX : X<[0], [1], [2]>; + def Z : Y<["fu"]>; |

