1 // RUN: llvm-tblgen -gen-global-isel -I %p/../../include -I %p/Common %s -o %t
2 // RUN: FileCheck %s < %t
4 // Both predicates should be tested
5 // CHECK-DAG: GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIPFP_MI_Predicate_pat_frag_b,
6 // CHECK-DAG: GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIPFP_MI_Predicate_pat_frag_a,
8 include "llvm/Target/Target.td"
9 include "GlobalISelEmitterCommon.td"
12 def pat_frag_a : PatFrag <(ops node:$ptr), (load node:$ptr), [{}]> {
13 let PredicateCode = [{ return isInstA(MI); }];
14 let GISelPredicateCode = [{ return isInstA(MI); }];
17 def pat_frag_b : PatFrag <(ops node:$ptr), (load node:$ptr), [{}]> {
18 let PredicateCode = [{ return isInstB(MI); }];
19 let GISelPredicateCode = [{ return isInstB(MI); }];
22 def inst_a : Instruction {
23 let OutOperandList = (outs GPR32:$dst);
24 let InOperandList = (ins GPR32:$src);
26 def inst_b : Instruction {
27 let OutOperandList = (outs GPR32:$dst);
28 let InOperandList = (ins GPR32:$src);
32 (pat_frag_a GPR32:$src),
37 (pat_frag_b GPR32:$src),