Test Operand Arguments
[oota-llvm.git] / test / TableGen / LetInsideMultiClasses.td
1 // RUN: tblgen %s | grep "bit IsDouble = 1;" | count 3
2 // XFAIL: vg_leak
3
4 class Instruction<bits<4> opc, string Name> {
5   bits<4> opcode = opc;
6   string name = Name;
7   bit IsDouble = 0;
8 }
9
10 multiclass basic_r<bits<4> opc> {
11   let name = "newname" in {
12     def rr : Instruction<opc, "rr">;
13     def rm : Instruction<opc, "rm">;
14   }
15
16   let name = "othername" in
17     def rx : Instruction<opc, "rx">;
18 }
19
20 multiclass basic_ss<bits<4> opc> {
21   let IsDouble = 0 in
22     defm SS : basic_r<opc>;
23
24   let IsDouble = 1 in
25     defm SD : basic_r<opc>;
26 }
27
28 defm ADD : basic_ss<0xf>;
29