[llvm-commits] CVS: llvm/test/Regression/TableGen/Tree.td
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 4 15:44:01 PDT 2003
Changes in directory llvm/test/Regression/TableGen:
Tree.td added (r1.1)
---
Log message:
New testcase
---
Diffs of the changes:
Index: llvm/test/Regression/TableGen/Tree.td
diff -c /dev/null llvm/test/Regression/TableGen/Tree.td:1.1
*** /dev/null Mon Aug 4 15:43:58 2003
--- llvm/test/Regression/TableGen/Tree.td Mon Aug 4 15:43:48 2003
***************
*** 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
+
More information about the llvm-commits
mailing list