Paste.td 585 B

123456789101112131415161718192021222324252627282930313233343536
  1. // RUN: llvm-tblgen %s | FileCheck %s
  2. // XFAIL: vg_leak
  3. class Instr<int i> {
  4. int index = i;
  5. }
  6. multiclass Test {
  7. def Vx#NAME#PS : Instr<0>;
  8. def Vx#NAME#PD : Instr<1>;
  9. def Vy#NAME#PS : Instr<2>;
  10. def Vy#NAME#PD : Instr<3>;
  11. }
  12. defm ADD : Test;
  13. defm SUB : Test;
  14. // CHECK: VxADDPD
  15. // CHECK: index = 1;
  16. // CHECK: VxADDPS
  17. // CHECK: index = 0;
  18. // CHECK: VxSUBPD
  19. // CHECK: index = 1;
  20. // CHECK: VxSUBPS
  21. // CHECK: index = 0;
  22. // CHECK: VyADDPD
  23. // CHECK: index = 3;
  24. // CHECK: VyADDPS
  25. // CHECK: index = 2;
  26. // CHECK: VySUBPD
  27. // CHECK: index = 3;
  28. // CHECK: VySUBPS
  29. // CHECK: index = 2;