1 // RUN: llvm-tblgen -gen-instr-info -I %p/../../include %s | FileCheck %s
3 include "llvm/Target/Target.td"
5 def archInstrInfo : InstrInfo {}
8 let InstructionSet = archInstrInfo;
11 def R0 : Register<"r0">;
12 def P0 : Register<"p0">;
13 def R32 : RegisterClass<"MyNS", [i32], 0, (add R0)>;
14 def P1 : RegisterClass<"MyNS", [i1], 0, (add P0)>;
16 def Reg3Opnd : Operand<OtherVT> {
17 let MIOperandInfo = (ops R32, R32, P1);
20 // The following checks verify that 'MCInstrDesc' entry for 'InstA' has the
21 // expected 'NumOperands' and 'NumDefs', i.e. 'InstA' should have 3 defs out of
24 // CHECK: archInstrTable {{.* = \{}}
26 // CHECK: {{\{}} [[ID:[0-9]+]], 4, 3, 13, {{.+\}, \/\/}}
27 // CHECK-SAME: Inst #[[ID]] = InstA
28 def InstA : Instruction {
29 let Namespace = "MyNS";
31 // InstA should have 3 defs out of 4 operands.
32 let OutOperandList = (outs Reg3Opnd:$dst);
33 let InOperandList = (ins i32imm:$c);
35 field bits<8> SoftFail = 0;
36 let hasSideEffects = false;