1 // RUN: llvm-tblgen %s | FileCheck %s
3 class Register<string name, int idx> {
8 // CHECK-NOT: !strconcat
11 def Q#i : Register<"Q"#i, i>;
18 foreach i = [0, 1, 2, 3, 4, 5, 6, 7] in
19 def R#i : Register<"R"#i, i>;
22 // CHECK: string Name = "R0";
23 // CHECK: int Index = 0;
26 // CHECK: string Name = "R1";
27 // CHECK: int Index = 1;
30 // CHECK: string Name = "R2";
31 // CHECK: int Index = 2;
34 // CHECK: string Name = "R3";
35 // CHECK: int Index = 3;
38 // CHECK: string Name = "R4";
39 // CHECK: int Index = 4;
42 // CHECK: string Name = "R5";
43 // CHECK: int Index = 5;
46 // CHECK: string Name = "R6";
47 // CHECK: int Index = 6;
50 // CHECK: string Name = "R7";
51 // CHECK: int Index = 7;
53 foreach i = {0...3,9...7} in {
54 def S#i : Register<"Q"#i, i>;
55 def : Register<"T"#i, i>;
67 // CHECK: string Name = "T0";
70 // CHECK: string Name = "T1";
73 // CHECK: string Name = "T2";
76 // CHECK: string Name = "T3";
79 // CHECK: string Name = "T9";
82 // CHECK: string Name = "T8";
85 // CHECK: string Name = "T7";