1 // RUN: llvm-tblgen %s | FileCheck %s
11 // CHECK: int sum = 8;
17 // CHECK: int val = 9;
21 // CHECK: int val = 7;
25 // CHECK: int val = 11;
29 // CHECK: int val = 12;
53 // CHECK-NOT: def F2_0_0
55 // CHECK-NOT: def F2_1_2
58 // CHECK-NOT: def F2_2_2
61 foreach i = [0, 1] in {
70 multiclass B<int x, list<int> lst> {
80 defm B2 : B<7, [0, 4, 5]>;
83 foreach i = [x, !add(x, 1)] in {
93 foreach _ = !if(b, [0], []<int>) in
100 multiclass E<list<int> lst, int x>
107 defm E1 : E<[3, 5], 8>;
109 multiclass F<list<int> lst> {
111 foreach j = !foldl([]<int>, lst, lhs, x,
112 !if(!lt(x, i), !listconcat(lhs, [x]), lhs)) in
118 defm F2 : F<[0, 1, 2]>;