1 // RUN: llvm-tblgen -gen-emitter -I %p/../../include %s | FileCheck %s
3 // Check that EncoderMethod for RegisterOperand is working correctly
5 include "llvm/Target/Target.td"
7 def ArchInstrInfo : InstrInfo { }
10 let InstructionSet = ArchInstrInfo;
13 def Reg : Register<"reg">;
15 def RegClass : RegisterClass<"foo", [i32], 0, (add Reg)>;
17 def RegOperand : RegisterOperand<RegClass> {
18 let EncoderMethod = "barEncoder";
21 def foo : Instruction {
24 let OutOperandList = (outs);
25 let InOperandList = (ins RegOperand:$bar);
31 // CHECK: case ::foo: {
32 // CHECK: op = barEncoder
33 // CHECK: op &= UINT64_C(255);
34 // CHECK: Value |= op;