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