1 // RUN: llvm-tblgen -gen-instr-info -I %p/../../include %s | FileCheck %s
4 // CHECK-NOT: ABCForm_A
7 // include Target.td for InstrMapping class and define minimally required objects
10 include "llvm/Target/Target.td"
12 class DFVReg<string n> : Register<n> {
13 let Namespace = "DFV";
16 def R0 : DFVReg<"r0">;
17 def DFVRegClass : RegisterClass<"DFV",[i32],0,(add R0)>;
18 def DFVInstrInfo : InstrInfo;
20 def DFVTest : Target {
21 let InstructionSet = DFVInstrInfo;
25 // Define a number of a InstrMappings with repeated ValueCol fields
30 def getAFormFromBForm : InstrMapping {
31 let FilterClass = "ABCRel";
32 let RowFields = ["BaseName"];
33 let ColFields = ["ABCForm"];
35 let ValueCols = [["A"]];
38 def getAFormFromCForm : InstrMapping {
39 let FilterClass = "ABCRel";
40 let RowFields = ["BaseName"];
41 let ColFields = ["ABCForm"];
43 let ValueCols = [["A"]];
46 def getAFormFromDForm : InstrMapping {
47 let FilterClass = "ABCRel";
48 let RowFields = ["BaseName"];
49 let ColFields = ["ABCForm"];
51 let ValueCols = [["A"]];
54 def getAFormFromEForm : InstrMapping {
55 let FilterClass = "ABCRel";
56 let RowFields = ["BaseName"];
57 let ColFields = ["ABCForm"];
59 let ValueCols = [["A"]];
62 class I : Instruction {
63 let Namespace = "DFV";
64 let OutOperandList = (outs);
65 let InOperandList = (ins);
71 class isAForm { string ABCForm = "A"; }
72 class isBForm { string ABCForm = "B"; }
73 class isCForm { string ABCForm = "C"; }
74 class isDForm { string ABCForm = "D"; }
75 class isEForm { string ABCForm = "E"; }
77 let BaseName = "0" in {
78 def A0 : I, ABCRel, isAForm;
79 def B0 : I, ABCRel, isBForm;
80 def C0 : I, ABCRel, isCForm;
81 def D0 : I, ABCRel, isDForm;
82 def E0 : I, ABCRel, isEForm;