1// RUN: llvm-tblgen %s | FileCheck %s 2// XFAIL: vg_leak 3 4class Instr<int i> { 5 int index = i; 6} 7 8multiclass Test { 9 def Vx#NAME#PS : Instr<0>; 10 def Vx#NAME#PD : Instr<1>; 11 def Vy#NAME#PS : Instr<2>; 12 def Vy#NAME#PD : Instr<3>; 13} 14 15class Arithmetic<int i> { 16 string name = "number"#!add(i, 1); 17} 18 19def A : Arithmetic<5>; 20 21// CHECK: def A { 22// CHECK: string name = "number6"; 23// CHECK: } 24 25defm ADD : Test; 26defm SUB : Test; 27 28// CHECK: VxADDPD 29// CHECK: index = 1; 30// CHECK: VxADDPS 31// CHECK: index = 0; 32 33// CHECK: VxSUBPD 34// CHECK: index = 1; 35// CHECK: VxSUBPS 36// CHECK: index = 0; 37 38// CHECK: VyADDPD 39// CHECK: index = 3; 40// CHECK: VyADDPS 41// CHECK: index = 2; 42 43// CHECK: VySUBPD 44// CHECK: index = 3; 45// CHECK: VySUBPS 46// CHECK: index = 2; 47