aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-04 20:43:48 +0000
committerChris Lattner <sabre@nondot.org>2003-08-04 20:43:48 +0000
commit7c1af88b8e5cf381635eeeddbcbd30e28e17e41c (patch)
treef7bd24b3e7b3e79fe8086376175918490eef5791
parent13854f295bd135ab9d2306c7e947d8e9a1be2f95 (diff)
downloadexternal_llvm-7c1af88b8e5cf381635eeeddbcbd30e28e17e41c.zip
external_llvm-7c1af88b8e5cf381635eeeddbcbd30e28e17e41c.tar.gz
external_llvm-7c1af88b8e5cf381635eeeddbcbd30e28e17e41c.tar.bz2
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7575 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/TableGen/Tree.td18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/TableGen/Tree.td b/test/TableGen/Tree.td
new file mode 100644
index 0000000..f9f1f15
--- /dev/null
+++ b/test/TableGen/Tree.td
@@ -0,0 +1,18 @@
+// This tests to make sure we can parse tree patterns.
+// RUN: tblgen %s
+
+class TreeNode;
+class RegisterClass;
+
+def set : TreeNode;
+def plus : TreeNode;
+def imm : TreeNode;
+def R32 : RegisterClass;
+
+class Inst<dag T> {
+ dag Pattern = T;
+}
+
+def ADDrr32 : Inst<(set R32, (plus R32, R32))>; // a = b + c
+def ADDri32 : Inst<(set R32, (plus R32, imm))>; // a = b + imm
+