1// RUN: llvm-tblgen %s | FileCheck %s 2 3class Register<string name, int idx> { 4 string Name = name; 5 int Index = idx; 6} 7 8// CHECK-NOT: !strconcat 9 10foreach i = 0-3 in 11 def Q#i : Register<"Q"#i, i>; 12 13// CHECK: def Q0 14// CHECK: def Q1 15// CHECK: def Q2 16// CHECK: def Q3 17 18foreach i = [0, 1, 2, 3, 4, 5, 6, 7] in 19 def R#i : Register<"R"#i, i>; 20 21// CHECK: def R0 22// CHECK: string Name = "R0"; 23// CHECK: int Index = 0; 24 25// CHECK: def R1 26// CHECK: string Name = "R1"; 27// CHECK: int Index = 1; 28 29// CHECK: def R2 30// CHECK: string Name = "R2"; 31// CHECK: int Index = 2; 32 33// CHECK: def R3 34// CHECK: string Name = "R3"; 35// CHECK: int Index = 3; 36 37// CHECK: def R4 38// CHECK: string Name = "R4"; 39// CHECK: int Index = 4; 40 41// CHECK: def R5 42// CHECK: string Name = "R5"; 43// CHECK: int Index = 5; 44 45// CHECK: def R6 46// CHECK: string Name = "R6"; 47// CHECK: int Index = 6; 48 49// CHECK: def R7 50// CHECK: string Name = "R7"; 51// CHECK: int Index = 7; 52 53foreach i = {0-3,9-7} in 54 def S#i : Register<"Q"#i, i>; 55 56// CHECK: def S0 57// CHECK: def S1 58// CHECK: def S2 59// CHECK: def S3 60// CHECK: def S7 61// CHECK: def S8 62// CHECK: def S9 63