1 // RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
3 // Check that we don't generate invalid code of the form "( && Cond2)" when
4 // emitting AssemblerPredicate conditions. In the example below, the invalid
5 // code would be: "return ( && (Bits & arch::AssemblerCondition2));".
7 include "llvm/Target/Target.td"
9 def archInstrInfo : InstrInfo { }
12 let InstructionSet = archInstrInfo;
15 def Pred1 : Predicate<"Condition1">;
16 def Pred2 : Predicate<"Condition2">,
17 AssemblerPredicate<"AssemblerCondition2">;
19 def foo : Instruction {
21 let OutOperandList = (outs);
22 let InOperandList = (ins);
25 let AsmString = "foo";
26 field bits<16> SoftFail = 0;
27 // This is the important bit:
28 let Predicates = [Pred1, Pred2];
31 // CHECK: return (Bits[arch::AssemblerCondition2]);