blob: cb13508e51179ad6bdcc88ef02da330b05c34a10 [file] [log] [blame]
Peter Collingbourne5d5c0622011-10-06 13:39:59 +00001// RUN: llvm-tblgen %s | grep "bit IsDouble = 1;" | count 3
Bruno Cardoso Lopesee65db32010-06-10 02:42:59 +00002// XFAIL: vg_leak
3
4class Instruction<bits<4> opc, string Name> {
5 bits<4> opcode = opc;
6 string name = Name;
7 bit IsDouble = 0;
8}
9
10multiclass 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
20multiclass 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
28defm ADD : basic_ss<0xf>;
29