1// This tests to make sure we can parse tree patterns. 2// RUN: llvm-tblgen %s 3// XFAIL: vg_leak 4 5class TreeNode; 6class RegisterClass; 7 8def set : TreeNode; 9def plus : TreeNode; 10def imm : TreeNode; 11def R32 : RegisterClass; 12 13class Inst<dag T> { 14 dag Pattern = T; 15} 16 17def ADDrr32 : Inst<(set R32, (plus R32, R32))>; // a = b + c 18def ADDri32 : Inst<(set R32, (plus R32, imm))>; // a = b + imm 19 20