• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-tblgen %s | FileCheck %s
2
3class Register<string name, int idx> {
4  string Name = name;
5  int Index = idx;
6}
7
8foreach i = [0, 1, 2, 3, 4, 5, 6, 7] in {
9  def R#i : Register<"R"#i, i>;
10  def F#i : Register<"F"#i, i>;
11}
12
13// CHECK: def F0
14// CHECK: string Name = "F0";
15// CHECK: int Index = 0;
16
17// CHECK: def F1
18// CHECK: string Name = "F1";
19// CHECK: int Index = 1;
20
21// CHECK: def F2
22// CHECK: string Name = "F2";
23// CHECK: int Index = 2;
24
25// CHECK: def F3
26// CHECK: string Name = "F3";
27// CHECK: int Index = 3;
28
29// CHECK: def F4
30// CHECK: string Name = "F4";
31// CHECK: int Index = 4;
32
33// CHECK: def F5
34// CHECK: string Name = "F5";
35// CHECK: int Index = 5;
36
37// CHECK: def F6
38// CHECK: string Name = "F6";
39// CHECK: int Index = 6;
40
41// CHECK: def F7
42// CHECK: string Name = "F7";
43// CHECK: int Index = 7;
44
45// CHECK: def R0
46// CHECK: string Name = "R0";
47// CHECK: int Index = 0;
48
49// CHECK: def R1
50// CHECK: string Name = "R1";
51// CHECK: int Index = 1;
52
53// CHECK: def R2
54// CHECK: string Name = "R2";
55// CHECK: int Index = 2;
56
57// CHECK: def R3
58// CHECK: string Name = "R3";
59// CHECK: int Index = 3;
60
61// CHECK: def R4
62// CHECK: string Name = "R4";
63// CHECK: int Index = 4;
64
65// CHECK: def R5
66// CHECK: string Name = "R5";
67// CHECK: int Index = 5;
68
69// CHECK: def R6
70// CHECK: string Name = "R6";
71// CHECK: int Index = 6;
72
73// CHECK: def R7
74// CHECK: string Name = "R7";
75// CHECK: int Index = 7;
76