[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / TableGen / NestedForeach.td
blobdb5bdd0e0bcebccc43e43ca6bf3a34b3ab75af21
1 // RUN: llvm-tblgen %s | FileCheck %s
3 class Droid<string series, int release, string model, int patchlevel> {
4   string Series = series;
5   int Release = release;
6   string Model = model;
7   int Patchlevel = patchlevel;
10 foreach S = ["R", "C"] in {
11   foreach R = [2, 3, 4] in {
12     foreach M = ["D", "P", "Q"] in {
13       foreach P = [0, 2, 4] in {
14         def S#R#M#P : Droid<S, R, M, P>;
15       }
16     }
17   }
20 foreach i = [0, 1] in
21   foreach j = !foreach(x, [0, 2], !add(i, x)) in
22     def Z#i#_#j;
24 // CHECK: def C2D0
25 // CHECK: def C2D2
26 // CHECK: def C2D4
27 // CHECK: def C2P0
28 // CHECK: def C2P2
29 // CHECK: def C2P4
30 // CHECK: def C2Q0
31 // CHECK: def C2Q2
32 // CHECK: def C2Q4
33 // CHECK: def C3D0
34 // CHECK: def C3D2
35 // CHECK: def C3D4
36 // CHECK: def C3P0
37 // CHECK: def C3P2
38 // CHECK: def C3P4
39 // CHECK: def C3Q0
40 // CHECK: def C3Q2
41 // CHECK: def C3Q4
42 // CHECK: def C4D0
43 // CHECK: def C4D2
44 // CHECK: def C4D4
45 // CHECK: def C4P0
46 // CHECK: def C4P2
47 // CHECK: def C4P4
48 // CHECK: def C4Q0
49 // CHECK: def C4Q2
50 // CHECK: def C4Q4
51 // CHECK: def R2D0
52 // CHECK: def R2D2
53 // CHECK: def R2D4
54 // CHECK: def R2P0
55 // CHECK: def R2P2
56 // CHECK: def R2P4
57 // CHECK: def R2Q0
58 // CHECK: def R2Q2
59 // CHECK: def R2Q4
60 // CHECK: def R3D0
61 // CHECK: def R3D2
62 // CHECK: def R3D4
63 // CHECK: def R3P0
64 // CHECK: def R3P2
65 // CHECK: def R3P4
66 // CHECK: def R3Q0
67 // CHECK: def R3Q2
68 // CHECK: def R3Q4
69 // CHECK: def R4D0
70 // CHECK: def R4D2
71 // CHECK: def R4D4
72 // CHECK: def R4P0
73 // CHECK: def R4P2
74 // CHECK: def R4P4
75 // CHECK: def R4Q0
76 // CHECK: def R4Q2
77 // CHECK: def R4Q4
79 // CHECK: def Z0_0
80 // CHECK: def Z0_2
81 // CHECK: def Z1_1
82 // CHECK: def Z1_3