aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-24 18:06:05 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-24 18:06:05 +0000
commit5b52f6d655e34de5c6fedbb71b6c94775cc10032 (patch)
tree147d3d1569f63029f88d6f987730ba84081f31f3 /test
parent9136f2112ca67bf360ee64b6546abea9dce0579c (diff)
downloadexternal_llvm-5b52f6d655e34de5c6fedbb71b6c94775cc10032.zip
external_llvm-5b52f6d655e34de5c6fedbb71b6c94775cc10032.tar.gz
external_llvm-5b52f6d655e34de5c6fedbb71b6c94775cc10032.tar.bz2
Add an (interleave A, B, ...) SetTheory operator.
This will interleave the elements from two or more lists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/TableGen/SetTheory.td7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/TableGen/SetTheory.td b/test/TableGen/SetTheory.td
index a4acea9..4d85aa3 100644
--- a/test/TableGen/SetTheory.td
+++ b/test/TableGen/SetTheory.td
@@ -165,3 +165,10 @@ def S9d : Set<(sequence "S%ua", 7, 9)>;
// CHECK: S9b = [ e7 e6 e5 e4 e3 ]
// CHECK: S9c = [ e0 ]
// CHECK: S9d = [ a b c d e0 e3 e6 e9 e4 e5 e7 ]
+
+// The 'interleave' operator is almost the inverse of 'decimate'.
+def interleave;
+def T0a : Set<(interleave S9a, S9b)>;
+def T0b : Set<(interleave S8e, S8d)>;
+// CHECK: T0a = [ e3 e7 e4 e6 e5 ]
+// CHECK: T0b = [ e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ]