[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / TableGen / GlobalISelCombinerEmitter / builtins / match-table-eraseroot.td
blob0dd265c14ddc2d7d7be2dd3a89a15efada4c2b2a
1 // RUN: llvm-tblgen -I %p/../../../../include -gen-global-isel-combiner \
2 // RUN:     -combiners=MyCombiner %s | \
3 // RUN: FileCheck %s
5 include "llvm/Target/Target.td"
6 include "llvm/Target/GlobalISel/Combine.td"
8 def MyTargetISA : InstrInfo;
9 def MyTarget : Target { let InstructionSet = MyTargetISA; }
11 def Test0 : GICombineRule<
12   (defs root:$mi),
13   (match (G_STORE $a, $b):$mi),
14   (apply (GIEraseRoot))>;
16 def MyCombiner: GICombiner<"GenMyCombiner", [
17   Test0,
18 ]>;
20 // CHECK:      const int64_t *GenMyCombiner::getMatchTable() const {
21 // CHECK-NEXT:   constexpr static int64_t MatchTable0[] = {
22 // CHECK-NEXT:     GIM_Try, /*On fail goto*//*Label 0*/ 10, // Rule ID 0 //
23 // CHECK-NEXT:       GIM_CheckSimplePredicate, GICXXPred_Simple_IsRule0Enabled,
24 // CHECK-NEXT:       GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_STORE,
25 // CHECK-NEXT:       // MIs[0] a
26 // CHECK-NEXT:       // No operand predicates
27 // CHECK-NEXT:       // MIs[0] b
28 // CHECK-NEXT:       // No operand predicates
29 // CHECK-NEXT:       // Combiner Rule #0: Test0
30 // CHECK-NEXT:       GIR_EraseFromParent, /*InsnID*/0,
31 // CHECK-NEXT:       GIR_Done,
32 // CHECK-NEXT:     // Label 0: @10
33 // CHECK-NEXT:     GIM_Reject,
34 // CHECK-NEXT:     };
35 // CHECK-NEXT:   return MatchTable0;
36 // CHECK-NEXT: }