1// RUN: llvm-tblgen %s | FileCheck %s 2 3class Set<int i = 0, int j = 0, int k = 0> { 4 int I = i; 5 int J = j; 6 int K = k; 7} 8 9foreach i = [1, 2, 3] in { 10 def I1_#i : Set<i>; 11 foreach j = [1, 2, 3] in { 12 def I1_#i#_J1_#j : Set<i, j>; 13 } 14 def I2_#i : Set<i>; 15 foreach j = [4, 5, 6] in { 16 foreach k = [1, 2, 3] in { 17 def I3_#i#_J2_#j#_K1_#k : Set<i, j, k>; 18 } 19 def I4_#i#_J3_#j : Set<i, j>; 20 } 21} 22 23// CHECK: def I1_1 24// CHECK: int I = 1; 25// CHECK: int J = 0; 26// CHECK: int K = 0; 27 28// CHECK: def I1_1_J1_1 29// CHECK: int I = 1; 30// CHECK: int J = 1; 31// CHECK: int K = 0; 32 33// CHECK: def I1_1_J1_2 34// CHECK: int I = 1; 35// CHECK: int J = 2; 36// CHECK: int K = 0; 37 38// CHECK: def I1_1_J1_3 39// CHECK: int I = 1; 40// CHECK: int J = 3; 41// CHECK: int K = 0; 42 43// CHECK: def I1_2 44// CHECK: int I = 2; 45// CHECK: int J = 0; 46// CHECK: int K = 0; 47 48// CHECK: def I1_2_J1_1 49// CHECK: int I = 2; 50// CHECK: int J = 1; 51// CHECK: int K = 0; 52 53// CHECK: def I1_2_J1_2 54// CHECK: int I = 2; 55// CHECK: int J = 2; 56// CHECK: int K = 0; 57 58// CHECK: def I1_2_J1_3 59// CHECK: int I = 2; 60// CHECK: int J = 3; 61// CHECK: int K = 0; 62 63// CHECK: def I1_3 64// CHECK: int I = 3; 65// CHECK: int J = 0; 66// CHECK: int K = 0; 67 68// CHECK: def I1_3_J1_1 69// CHECK: int I = 3; 70// CHECK: int J = 1; 71// CHECK: int K = 0; 72 73// CHECK: def I1_3_J1_2 74// CHECK: int I = 3; 75// CHECK: int J = 2; 76// CHECK: int K = 0; 77 78// CHECK: def I1_3_J1_3 79// CHECK: int I = 3; 80// CHECK: int J = 3; 81// CHECK: int K = 0; 82 83// CHECK: def I2_1 84// CHECK: int I = 1; 85// CHECK: int J = 0; 86// CHECK: int K = 0; 87 88// CHECK: def I2_2 89// CHECK: int I = 2; 90// CHECK: int J = 0; 91// CHECK: int K = 0; 92 93// CHECK: def I2_3 94// CHECK: int I = 3; 95// CHECK: int J = 0; 96// CHECK: int K = 0; 97 98// CHECK: def I3_1_J2_4_K1_1 99// CHECK: int I = 1; 100// CHECK: int J = 4; 101// CHECK: int K = 1; 102 103// CHECK: def I3_1_J2_4_K1_2 104// CHECK: int I = 1; 105// CHECK: int J = 4; 106// CHECK: int K = 2; 107 108// CHECK: def I3_1_J2_4_K1_3 109// CHECK: int I = 1; 110// CHECK: int J = 4; 111// CHECK: int K = 3; 112 113// CHECK: def I3_1_J2_5_K1_1 114// CHECK: int I = 1; 115// CHECK: int J = 5; 116// CHECK: int K = 1; 117 118// CHECK: def I3_1_J2_5_K1_2 119// CHECK: int I = 1; 120// CHECK: int J = 5; 121// CHECK: int K = 2; 122 123// CHECK: def I3_1_J2_5_K1_3 124// CHECK: int I = 1; 125// CHECK: int J = 5; 126// CHECK: int K = 3; 127 128// CHECK: def I3_1_J2_6_K1_1 129// CHECK: int I = 1; 130// CHECK: int J = 6; 131// CHECK: int K = 1; 132 133// CHECK: def I3_1_J2_6_K1_2 134// CHECK: int I = 1; 135// CHECK: int J = 6; 136// CHECK: int K = 2; 137 138// CHECK: def I3_1_J2_6_K1_3 139// CHECK: int I = 1; 140// CHECK: int J = 6; 141// CHECK: int K = 3; 142 143// CHECK: def I3_2_J2_4_K1_1 144// CHECK: int I = 2; 145// CHECK: int J = 4; 146// CHECK: int K = 1; 147 148// CHECK: def I3_2_J2_4_K1_2 149// CHECK: int I = 2; 150// CHECK: int J = 4; 151// CHECK: int K = 2; 152 153// CHECK: def I3_2_J2_4_K1_3 154// CHECK: int I = 2; 155// CHECK: int J = 4; 156// CHECK: int K = 3; 157 158// CHECK: def I3_2_J2_5_K1_1 159// CHECK: int I = 2; 160// CHECK: int J = 5; 161// CHECK: int K = 1; 162 163// CHECK: def I3_2_J2_5_K1_2 164// CHECK: int I = 2; 165// CHECK: int J = 5; 166// CHECK: int K = 2; 167 168// CHECK: def I3_2_J2_5_K1_3 169// CHECK: int I = 2; 170// CHECK: int J = 5; 171// CHECK: int K = 3; 172 173// CHECK: def I3_2_J2_6_K1_1 174// CHECK: int I = 2; 175// CHECK: int J = 6; 176// CHECK: int K = 1; 177 178// CHECK: def I3_2_J2_6_K1_2 179// CHECK: int I = 2; 180// CHECK: int J = 6; 181// CHECK: int K = 2; 182 183// CHECK: def I3_2_J2_6_K1_3 184// CHECK: int I = 2; 185// CHECK: int J = 6; 186// CHECK: int K = 3; 187 188// CHECK: def I3_3_J2_4_K1_1 189// CHECK: int I = 3; 190// CHECK: int J = 4; 191// CHECK: int K = 1; 192 193// CHECK: def I3_3_J2_4_K1_2 194// CHECK: int I = 3; 195// CHECK: int J = 4; 196// CHECK: int K = 2; 197 198// CHECK: def I3_3_J2_4_K1_3 199// CHECK: int I = 3; 200// CHECK: int J = 4; 201// CHECK: int K = 3; 202 203// CHECK: def I3_3_J2_5_K1_1 204// CHECK: int I = 3; 205// CHECK: int J = 5; 206// CHECK: int K = 1; 207 208// CHECK: def I3_3_J2_5_K1_2 209// CHECK: int I = 3; 210// CHECK: int J = 5; 211// CHECK: int K = 2; 212 213// CHECK: def I3_3_J2_5_K1_3 214// CHECK: int I = 3; 215// CHECK: int J = 5; 216// CHECK: int K = 3; 217 218// CHECK: def I3_3_J2_6_K1_1 219// CHECK: int I = 3; 220// CHECK: int J = 6; 221// CHECK: int K = 1; 222 223// CHECK: def I3_3_J2_6_K1_2 224// CHECK: int I = 3; 225// CHECK: int J = 6; 226// CHECK: int K = 2; 227 228// CHECK: def I3_3_J2_6_K1_3 229// CHECK: int I = 3; 230// CHECK: int J = 6; 231// CHECK: int K = 3; 232 233// CHECK: def I4_1_J3_4 234// CHECK: int I = 1; 235// CHECK: int J = 4; 236// CHECK: int K = 0; 237 238// CHECK: def I4_1_J3_5 239// CHECK: int I = 1; 240// CHECK: int J = 5; 241// CHECK: int K = 0; 242 243// CHECK: def I4_1_J3_6 244// CHECK: int I = 1; 245// CHECK: int J = 6; 246// CHECK: int K = 0; 247 248// CHECK: def I4_2_J3_4 249// CHECK: int I = 2; 250// CHECK: int J = 4; 251// CHECK: int K = 0; 252 253// CHECK: def I4_2_J3_5 254// CHECK: int I = 2; 255// CHECK: int J = 5; 256// CHECK: int K = 0; 257 258// CHECK: def I4_2_J3_6 259// CHECK: int I = 2; 260// CHECK: int J = 6; 261// CHECK: int K = 0; 262 263// CHECK: def I4_3_J3_4 264// CHECK: int I = 3; 265// CHECK: int J = 4; 266// CHECK: int K = 0; 267 268// CHECK: def I4_3_J3_5 269// CHECK: int I = 3; 270// CHECK: int J = 5; 271// CHECK: int K = 0; 272 273// CHECK: def I4_3_J3_6 274// CHECK: int I = 3; 275// CHECK: int J = 6; 276// CHECK: int K = 0; 277