1 // RUN: tblgen %s | FileCheck %s
4 //===----------------------------------------------------------------------===//
5 // Substitution of an int.
15 // CHECK-NEXT: dag d = (X1 13)
18 //===----------------------------------------------------------------------===//
19 // Substitution of a DAG.
33 // CHECK-NEXT: dag d = (X2 Y2)
34 // CHECK-NEXT: dag e = (Y2 X2)
37 //===----------------------------------------------------------------------===//
38 // Complex dag operator (F.TheOp).
41 def somedef1 : operator;
42 def somedef2 : operator;
44 class foo<operator a> {
48 class bar<foo F, operator a> {
49 dag Dag1 = (somedef1 1);
51 dag Dag3 = (F.TheOp 2);
54 def foo1 : foo<somedef1>;
55 def foo2 : foo<somedef2>;
57 def VAL3 : bar<foo1, somedef1>;
59 // CHECK: def VAL3 { // bar
60 // CHECK-NEXT: dag Dag1 = (somedef1 1);
61 // CHECK-NEXT: dag Dag2 = (somedef1 2);
62 // CHECK-NEXT: dag Dag3 = (somedef1 2);
66 def VAL4 : bar<foo2, somedef2>;
68 // CHECK-NEXT: dag Dag1 = (somedef1 1);
69 // CHECK-NEXT: dag Dag2 = (somedef2 2);
70 // CHECK-NEXT: dag Dag3 = (somedef2 2);