1 // RUN: llvm-tblgen -gen-asm-matcher -I %p/../../include %s | FileCheck %s
3 // Check that specifying AsmVariant works correctly
5 include "llvm/Target/Target.td"
7 def ArchInstrInfo : InstrInfo { }
9 def FooAsmParserVariant : AsmParserVariant {
14 def BarAsmParserVariant : AsmParserVariant {
20 let InstructionSet = ArchInstrInfo;
21 let AssemblyParserVariants = [FooAsmParserVariant, BarAsmParserVariant];
24 def Reg : Register<"reg">;
26 def RegClass : RegisterClass<"foo", [i32], 0, (add Reg)>;
28 def foo : Instruction {
30 let OutOperandList = (outs);
31 let InOperandList = (ins);
32 let AsmString = "foo";
33 let AsmVariantName = "Foo";
34 let Namespace = "Arch";
37 def BarAlias : InstAlias<"bar", (foo)> {
38 string AsmVariantName = "Bar";
41 // CHECK: static const MatchEntry MatchTable0[] = {
42 // CHECK-NEXT: /* foo */, Arch::foo
45 // CHECK: static const MatchEntry MatchTable1[] = {
46 // CHECK-NEXT: /* bar */, Arch::foo