xref: /llvm-project/mlir/test/mlir-pdll/split-markers.pdll (revision 83da7b6338053ca04cf0afe3c70ef5b8a9f6d300)
1// Check that (1) the default input split marker used if no custom marker is
2// specified and (2) the output file is merged using the default marker.
3// RUN: mlir-pdll %s -split-input-file \
4// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
5
6// Check that the custom (3) input and (output) split markers are used if
7// provided.
8// RUN: mlir-pdll %s \
9// RUN:   -split-input-file="// ""=====" -output-split-marker "// #####" \
10// RUN: | FileCheck -check-prefix=CHECK-CUSTOM %s
11
12// Check that (5) the input is not split if `-split-input-file` is not given.
13// RUN: mlir-pdll %s \
14// RUN: | FileCheck -check-prefix=CHECK-NOSPLIT %s
15
16// CHECK-DEFAULT:      Module
17// CHECK-DEFAULT-NEXT: PatternDecl
18// CHECK-DEFAULT-NOT:  PatternDecl
19// CHECK-DEFAULT:      //{{ }}-----
20// CHECK-DEFAULT-NEXT: Module
21// CHECK-DEFAULT-NEXT: PatternDecl
22// CHECK-DEFAULT:      PatternDecl
23
24// CHECK-CUSTOM:      Module
25// CHECK-CUSTOM-NEXT: PatternDecl
26// CHECK-CUSTOM:      PatternDecl
27// CHECK-CUSTOM:      // #####
28// CHECK-CUSTOM-NEXT: Module
29// CHECK-CUSTOM-NEXT: PatternDecl
30// CHECK-CUSTOM-NOT:  PatternDecl
31
32// CHECK-NOSPLIT:      Module
33// CHECK-NOSPLIT-NEXT: PatternDecl
34// CHECK-NOSPLIT-NOT:  Module
35// CHECK-NOSPLIT:      PatternDecl
36// CHECK-NOSPLIT-NOT:  Module
37// CHECK-NOSPLIT:      PatternDecl
38// CHECK-NOSPLIT-NOT:  Module
39
40Pattern => erase op<test.op>;
41
42// -----
43
44Pattern => erase op<test.op2>;
45
46// =====
47
48Pattern => erase op<test.op3>;
49