1 // RUN: llvm-tblgen -gen-instr-info -I %p/../../include %s | FileCheck %s
3 // Check that getOperandType has the expected info in it
5 include "llvm/Target/Target.td"
7 def archInstrInfo : InstrInfo { }
10 let InstructionSet = archInstrInfo;
13 def Reg : Register<"reg">;
14 def RegClass : RegisterClass<"foo", [i32], 0, (add Reg)>;
16 def OpA : Operand<i32>;
17 def OpB : Operand<i32>;
19 def InstA : Instruction {
21 let OutOperandList = (outs OpA:$a);
22 let InOperandList = (ins OpB:$b, i32imm:$c);
24 field bits<8> SoftFail = 0;
25 let Namespace = "MyNamespace";
28 def InstB : Instruction {
30 let OutOperandList = (outs i32imm:$d);
31 let InOperandList = (ins unknown:$x);
33 field bits<8> SoftFail = 0;
34 let Namespace = "MyNamespace";
37 // CHECK: #ifdef GET_INSTRINFO_OPERAND_TYPE
38 // CHECK: OpTypes::OpA, OpTypes::OpB, OpTypes::i32imm,
39 // CHECK-NEXT: OpTypes::i32imm, -1,
40 // CHECK: #endif //GET_INSTRINFO_OPERAND_TYPE