llvm.org GIT mirror llvm / 3ce88b9
Add Paste Test This tests TableGen's paste functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142526 91177308-0d34-0410-b5e6-96231b3b80d8 David Greene 7 years ago
1 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 // RUN: llvm-tblgen %s | FileCheck %s
1
2 class Instr {
3 int index = i;
4 }
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
13 defm ADD : Test;
14 defm SUB : Test;
15
16 // CHECK: VxADDPD
17 // CHECK: index = 1;
18 // CHECK: VxADDPS
19 // CHECK: index = 0;
20
21 // CHECK: VxSUBPD
22 // CHECK: index = 1;
23 // CHECK: VxSUBPS
24 // CHECK: index = 0;
25
26 // CHECK: VyADDPD
27 // CHECK: index = 3;
28 // CHECK: VyADDPS
29 // CHECK: index = 2;
30
31 // CHECK: VySUBPD
32 // CHECK: index = 3;
33 // CHECK: VySUBPS
34 // CHECK: index = 2;