brintos

brintos / llvm-project-archived public Read only

0
0
Text · 743 B · 22c492b Raw
47 lines · plain
1// RUN: llvm-tblgen %s | FileCheck %s2// XFAIL: vg_leak3 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: VxADDPD29// CHECK: index = 1;30// CHECK: VxADDPS31// CHECK: index = 0;32 33// CHECK: VxSUBPD34// CHECK: index = 1;35// CHECK: VxSUBPS36// CHECK: index = 0;37 38// CHECK: VyADDPD39// CHECK: index = 3;40// CHECK: VyADDPS41// CHECK: index = 2;42 43// CHECK: VySUBPD44// CHECK: index = 3;45// CHECK: VySUBPS46// CHECK: index = 2;47