1 ;---------------------------------------------------------------------
2 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
3 ; RUN: -check-prefix=IdentPat
4 ; RUN: FileCheck -input-file %s %s -check-prefix=IdentPat
12 ; IdentPat: {{^}}__IdentPat
13 ; IdentPat-DAG: {{^}}add [[REG1:r[0-9]+]], {{r[0-9]+}}, {{r[0-9]+}}
14 ; IdentPat-DAG: {{^}}add [[REG2:r[0-9]+]], {{r[0-9]+}}, {{r[0-9]+}}
15 ; IdentPat: {{^}}mul r5, [[REG1]], [[REG2]]
16 ; IdentPat: {{^}}__IdentPat
18 ;---------------------------------------------------------------------
19 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
20 ; RUN: -check-prefix=IdentPatNot
21 ; RUN: FileCheck -input-file %s %s -check-prefix=IdentPatNot
30 ; IdentPatNot: {{^}}__IdentPatNot
31 ; IdentPatNot-DAG: {{^}}add {{r[0-9]+}}, {{r[0-9]+}}, {{r[0-9]+}}
32 ; IdentPatNot-DAG: {{^}}add {{r[0-9]+}}, {{r[0-9]+}}, {{r[0-9]+}}
33 ; IdentPatNot-NOT: {{^}}xor
34 ; IdentPatNot-DAG: {{^}}mul r5, r10, r11
35 ; IdentPatNot: {{^}}__IdentPatNot
37 ;---------------------------------------------------------------------
38 ; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
39 ; RUN: -check-prefix=IdentPatVarDiff
40 ; RUN: FileCheck -input-file %s %s -check-prefix=IdentPatVarDiff
43 call void @foo(), !dbg !0
44 call void @bar(), !dbg !1
45 !1 = !DILocation(line: 1,
46 !0 = !DILocation(line: 1,
49 ; IdentPatVarDiff: {{^}}__IdentPatVarDiff
50 ; IdentPatVarDiff: {{^}}call void @foo(), !dbg [[DBG0:![0-9]+]]
51 ; IdentPatVarDiff: {{^}}call void @bar(), !dbg [[DBG1:![0-9]+]]
52 ; IdentPatVarDiff-DAG: {{^}}[[DBG0]] = !DILocation(line: 1,
53 ; IdentPatVarDiff-DAG: {{^}}[[DBG1]] = !DILocation(line: 1,
54 ; IdentPatVarDiff: {{^}}__IdentPatVarDiff
56 ;---------------------------------------------------------------------
57 ; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
58 ; RUN: -check-prefix=IdentPatVarSame
59 ; RUN: not FileCheck -input-file %s %s -check-prefix=IdentPatVarSame
62 call void @foo(), !dbg !0
63 call void @bar(), !dbg !0
64 !1 = !DILocation(line: 1,
65 !0 = !DILocation(line: 1,
68 ; IdentPatVarSame: {{^}}__IdentPatVarSame
69 ; IdentPatVarSame: {{^}}call void @foo(), !dbg [[DBG0:![0-9]+]]
70 ; IdentPatVarSame: {{^}}call void @bar(), !dbg [[DBG1:![0-9]+]]
71 ; IdentPatVarSame-DAG: {{^}}[[DBG0]] = !DILocation(line: 1,
72 ; IdentPatVarSame-DAG: {{^}}[[DBG1]] = !DILocation(line: 1,
73 ; IdentPatVarSame: {{^}}__IdentPatVarSame
75 ;---------------------------------------------------------------------
76 ; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
77 ; RUN: -check-prefix=SupSubSet
78 ; RUN: not FileCheck -input-file %s %s -check-prefix=SupSubSet
87 ; SupSubSet: {{^}}__SupSubSet
88 ; SupSubSet-DAG: {{^}}store i64 {{4|8}}, i64* %a
89 ; SupSubSet-DAG: {{^}}store i64 4, i64* %a
90 ; SupSubSet-DAG: {{^}}store i64 {{4|8}}, i64* %b
91 ; SupSubSet-DAG: {{^}}store i64 4, i64* %b
92 ; SupSubSet: {{^}}__SupSubSet
94 ;---------------------------------------------------------------------
95 ; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
96 ; RUN: -check-prefix=SubSupSet
97 ; RUN: FileCheck -input-file %s %s -check-prefix=SubSupSet
106 ; SubSupSet: {{^}}__SubSupSet
107 ; SubSupSet-DAG: {{^}}store i64 4, i64* %a
108 ; SubSupSet-DAG: {{^}}store i64 {{4|8}}, i64* %a
109 ; SubSupSet-DAG: {{^}}store i64 4, i64* %b
110 ; SubSupSet-DAG: {{^}}store i64 {{4|8}}, i64* %b
111 ; SubSupSet: {{^}}__SubSupSet
113 ;---------------------------------------------------------------------
114 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
115 ; RUN: -check-prefixes=WrongNumReps
116 ; RUN: not FileCheck -input-file %s %s -check-prefixes=WrongNumReps
118 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
119 ; RUN: -check-prefixes=WrongNumReps,WrongNumReps2
120 ; RUN: FileCheck -input-file %s %s \
121 ; RUN: -check-prefixes=WrongNumReps,WrongNumReps2
123 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
124 ; RUN: -check-prefixes=WrongNumReps,WrongNumReps2,WrongNumReps3
125 ; RUN: not FileCheck -input-file %s %s \
126 ; RUN: -check-prefixes=WrongNumReps,WrongNumReps2,WrongNumReps3
135 ; WrongNumReps: {{^}}__WrongNumReps
136 ; WrongNumReps-DAG: {{^}}[[THID:[0-9]+]]: task_begin
137 ; WrongNumReps-DAG: {{^}}[[THID]]: barrier_begin
138 ; WrongNumReps2-DAG: {{^}}[[THID:[0-9]+]]: task_begin
139 ; WrongNumReps2-DAG: {{^}}[[THID]]: barrier_begin
140 ; WrongNumReps3-DAG: {{^}}[[THID:[0-9]+]]: task_begin
141 ; WrongNumReps3-DAG: {{^}}[[THID]]: barrier_begin
142 ; WrongNumReps-NEXT: {{^}}__WrongNumReps
144 ;---------------------------------------------------------------------
145 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
146 ; RUN: -check-prefix=SameSimple
147 ; RUN: FileCheck -input-file %s %s -check-prefix=SameSimple
153 ; SameSimple: {{^}}__SameSimple
155 ; SameSimple-DAG: <foo>
156 ; SameSimple-DAG: <foo>
157 ; SameSimple-DAG: <bar>
158 ; SameSimple-NOT: <foo>
159 ; SameSimple-SAME: ){{$}}
160 ; SameSimple: {{^}}__SameSimple
162 ;---------------------------------------------------------------------
163 ; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \
164 ; RUN: -check-prefix=DagNotDag
165 ; RUN: FileCheck -input-file %s %s -check-prefix=DagNotDag
167 Assume we have DAGs, NOTs, DAGs, NOTs, and then DAGs. Let X, Y, and Z be
168 the DAG groups such that the leading DAGs are x, y, and z. y won't match
169 overlaps with matches from:
171 1. X. Otherwise, we used to get a spurious reordering complaint (back
172 when reordering complaints on DAG-NOT-DAG were still implemented).
173 2. Y, because y is in Y. To prevent these overlaps, the implementation must be
174 careful not to drop y's match from the previous matches list when it drops
175 matches from X to save search time.
176 3. z. This follows by applying rule #1 for z instead of y.
192 ; DagNotDag: {{^}}__DagNotDag
195 ; x:DagNotDag-DAG: {{^}}abcdefgh
196 ; DagNotDag-DAG: {{^}}abcd
197 ; DagNotDag-DAG: efgh{{$}}
199 ; Reordering complaint if rule #1 is broken.
200 ; DagNotDag-NOT: abcd
201 ; DagNotDag-NOT: efgh
204 ; y:DagNotDag-DAG: {{^}}abcd
205 ; DagNotDag-DAG: {{^}}ab
206 ; DagNotDag-DAG: cd{{$}}
208 ; Matches if rule #2 is broken.
213 ; z:DagNotDag-DAG: {{^}}abcd
214 ; DagNotDag-DAG: {{^}}ab
215 ; DagNotDag-DAG: cd{{$}}
217 ; Matches if rule #3 is broken.
218 ; DagNotDag-NOT: {{^}}ab
219 ; DagNotDag-NOT: {{^}}cd
221 ; DagNotDag: {{^}}__DagNotDag