1 ; This test is essentially doing very basic things with the opt tool and the
2 ; new pass manager pipeline. It will be used to flesh out the feature
3 ; completeness of the opt tool when the new pass manager is engaged. The tests
4 ; may not be useful once it becomes the default or may get spread out into other
5 ; files, but for now this is just going to step the new process through its
8 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
9 ; RUN: -passes=no-op-module %s 2>&1 \
10 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS
11 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
12 ; RUN: -p no-op-module %s 2>&1 \
13 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS
14 ; CHECK-MODULE-PASS: Running pass: NoOpModulePass
16 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
17 ; RUN: -passes=no-op-cgscc %s 2>&1 \
18 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
19 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
20 ; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \
21 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
22 ; CHECK-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
23 ; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
24 ; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
25 ; CHECK-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
26 ; CHECK-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
27 ; CHECK-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
28 ; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
30 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
31 ; RUN: -passes=no-op-function %s 2>&1 \
32 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
33 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
34 ; RUN: -passes='function(no-op-function)' %s 2>&1 \
35 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
36 ; CHECK-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
37 ; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
39 ; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \
40 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
41 ; CHECK-MODULE-PRINT: Running pass: PrintModulePass
42 ; CHECK-MODULE-PRINT: ModuleID
43 ; CHECK-MODULE-PRINT: define void @foo(i1 %x, ptr %p1, ptr %p2)
44 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
46 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-analysis-invalidation=0 -passes='print,verify' %s 2>&1 \
47 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
48 ; CHECK-MODULE-VERIFY: Running pass: PrintModulePass
49 ; CHECK-MODULE-VERIFY: ModuleID
50 ; CHECK-MODULE-VERIFY: define void @foo(i1 %x, ptr %p1, ptr %p2)
51 ; CHECK-MODULE-VERIFY: Running pass: VerifierPass
53 ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
54 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
55 ; CHECK-FUNCTION-PRINT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
56 ; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass
57 ; CHECK-FUNCTION-PRINT-NOT: ModuleID
58 ; CHECK-FUNCTION-PRINT: define void @foo(i1 %x, ptr %p1, ptr %p2)
59 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
61 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-analysis-invalidation=0 -passes='function(print,verify)' %s 2>&1 \
62 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
63 ; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass
64 ; CHECK-FUNCTION-VERIFY-NOT: ModuleID
65 ; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x, ptr %p1, ptr %p2)
66 ; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass
68 ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
69 ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
70 ; CHECK-NOOP: define void @foo(i1 %x, ptr %p1, ptr %p2) {
72 ; CHECK-NOOP: store i8 42, ptr %p1
73 ; CHECK-NOOP: br i1 %x, label %loop, label %exit
75 ; CHECK-NOOP: %tmp1 = load i8, ptr %p2
76 ; CHECK-NOOP: br label %loop
78 ; CHECK-NOOP: ret void
81 ; Round trip through bitcode.
82 ; RUN: opt -f -o - -passes='no-op-module,no-op-module' %s \
84 ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
86 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-analysis-invalidation=0 -passes='no-op-module,function(no-op-function)' %s 2>&1 \
87 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY
88 ; CHECK-NO-VERIFY-NOT: VerifierPass
89 ; CHECK-NO-VERIFY: Running pass: NoOpModulePass
90 ; CHECK-NO-VERIFY-NOT: VerifierPass
91 ; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass
92 ; CHECK-NO-VERIFY-NOT: VerifierPass
94 ; RUN: opt -disable-output -debug-pass-manager \
95 ; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
96 ; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES
97 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
98 ; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis
99 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
100 ; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis
101 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
102 ; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis
104 ; Make sure no-op passes that preserve all analyses don't even try to do any
105 ; analysis invalidation.
106 ; RUN: opt -disable-output -debug-pass-manager \
107 ; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
108 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION
109 ; CHECK-NO-OP-INVALIDATION-NOT: Invalidat
111 ; RUN: opt -disable-output -debug-pass-manager \
112 ; RUN: -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
113 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
114 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
115 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
116 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis
118 ; RUN: opt -disable-output -debug-pass-manager \
119 ; RUN: -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \
120 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
121 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
122 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
123 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis
124 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
126 ; RUN: opt -disable-output -debug-pass-manager \
127 ; RUN: -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
128 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
129 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
130 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
131 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis
133 ; RUN: opt -disable-output -debug-pass-manager \
134 ; RUN: -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
135 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
136 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
137 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
138 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis
139 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
141 ; RUN: opt -disable-output -debug-pass-manager \
142 ; RUN: -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \
143 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
144 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
145 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
146 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis
148 ; RUN: opt -disable-output -debug-pass-manager \
149 ; RUN: -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \
150 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
151 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
152 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
153 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis
154 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
156 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
157 ; RUN: -passes='require<no-op-module>,module(require<no-op-module>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-module>),require<no-op-module>' %s 2>&1 \
158 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
159 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
160 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
161 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
162 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
163 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
164 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
165 ; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass
166 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis
167 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
168 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
169 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis
170 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
171 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
172 ; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis
173 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
174 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
176 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
177 ; RUN: -passes='require<no-op-module>,module(require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-cgscc>),require<no-op-module>),require<no-op-module>' %s 2>&1 \
178 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
179 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
180 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
181 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
182 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
183 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
184 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
185 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
186 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
187 ; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass
188 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis
189 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
190 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
191 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis
192 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis
193 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
194 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
195 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis
196 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis
197 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
198 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
199 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis
200 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
201 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
203 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
204 ; RUN: -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
205 ; RUN: | FileCheck %s --check-prefix=CHECK-TLI
206 ; CHECK-TLI: Running pass: RequireAnalysisPass
207 ; CHECK-TLI: Running analysis: TargetLibraryAnalysis
208 ; CHECK-TLI: Running pass: InvalidateAllAnalysesPass
209 ; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis
210 ; CHECK-TLI: Running pass: RequireAnalysisPass
211 ; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis
213 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
214 ; RUN: -passes='require<targetir>,invalidate<all>,require<targetir>' \
215 ; RUN: | FileCheck %s --check-prefix=CHECK-TIRA
216 ; CHECK-TIRA: Running pass: RequireAnalysisPass
217 ; CHECK-TIRA: Running analysis: TargetIRAnalysis
218 ; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass
219 ; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis
220 ; CHECK-TIRA: Running pass: RequireAnalysisPass
221 ; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis
223 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
224 ; RUN: -passes='require<domtree>' \
225 ; RUN: | FileCheck %s --check-prefix=CHECK-DT
226 ; CHECK-DT: Running pass: RequireAnalysisPass
227 ; CHECK-DT: Running analysis: DominatorTreeAnalysis
229 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
230 ; RUN: -passes='require<basic-aa>' \
231 ; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA
232 ; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
233 ; CHECK-BASIC-AA: Running analysis: BasicAA
235 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
236 ; RUN: -passes='require<aa>' -aa-pipeline='basic-aa' \
237 ; RUN: | FileCheck %s --check-prefix=CHECK-AA
238 ; CHECK-AA: Running pass: RequireAnalysisPass
239 ; CHECK-AA: Running analysis: AAManager
240 ; CHECK-AA: Running analysis: BasicAA
242 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
243 ; RUN: -passes='require<aa>' -aa-pipeline='default' \
244 ; RUN: | FileCheck %s --check-prefix=CHECK-AA-DEFAULT
245 ; CHECK-AA-DEFAULT: Running pass: RequireAnalysisPass
246 ; CHECK-AA-DEFAULT: Running analysis: AAManager
247 ; CHECK-AA-DEFAULT: Running analysis: BasicAA
248 ; CHECK-AA-DEFAULT: Running analysis: ScopedNoAliasAA
249 ; CHECK-AA-DEFAULT: Running analysis: TypeBasedAA
251 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
252 ; RUN: -passes='require<aa>,invalidate<domtree>,aa-eval' -aa-pipeline='basic-aa' \
253 ; RUN: | FileCheck %s --check-prefix=CHECK-AA-FUNCTION-INVALIDATE
254 ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: RequireAnalysisPass
255 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
256 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
257 ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: InvalidateAnalysisPass
258 ; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis
259 ; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: BasicAA
260 ; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: AAManager
261 ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: AAEvaluator
262 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
263 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
265 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
266 ; RUN: -passes='require<globals-aa>,function(require<aa>),invalidate<globals-aa>,require<globals-aa>,function(aa-eval)' -aa-pipeline='globals-aa' \
267 ; RUN: | FileCheck %s --check-prefix=CHECK-AA-MODULE-INVALIDATE
268 ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
269 ; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
270 ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
271 ; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager
272 ; CHECK-AA-MODULE-INVALIDATE: Running pass: InvalidateAnalysisPass
273 ; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: GlobalsAA
274 ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
275 ; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
276 ; CHECK-AA-MODULE-INVALIDATE: Running pass: AAEvaluator
278 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
279 ; RUN: -passes='require<memdep>' \
280 ; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP
281 ; CHECK-MEMDEP: Running pass: RequireAnalysisPass
282 ; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis
284 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
285 ; RUN: -passes='require<callgraph>' \
286 ; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH
287 ; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass
288 ; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis
290 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
291 ; RUN: -passes='default<O0>' %s 2>&1 \
292 ; RUN: | FileCheck %s --check-prefix=CHECK-O0 --check-prefix=%llvmcheckext
293 ; CHECK-O0: Running pass: AlwaysInlinerPass
294 ; CHECK-O0-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
295 ; CHECK-O0-NEXT: Running analysis: ProfileSummaryAnalysis
296 ; CHECK-EXT-NEXT: Running pass: {{.*}}Bye
297 ; We don't have checks for CHECK-NOEXT here, but this simplifies the test, while
298 ; avoiding FileCheck complaining about the unused prefix.
299 ; CHECK-NOEXT: {{.*}}
301 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
302 ; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \
303 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS
304 ; CHECK-REPEAT-MODULE-PASS: Running pass: RepeatedPass
305 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
306 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
307 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
309 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
310 ; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \
311 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS
312 ; CHECK-REPEAT-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
313 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
314 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
315 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
316 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
317 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
318 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass
319 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
320 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
321 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
323 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
324 ; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \
325 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS
326 ; CHECK-REPEAT-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
327 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass
328 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
329 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
330 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
332 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager \
333 ; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \
334 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS
335 ; CHECK-REPEAT-LOOP-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
336 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LoopSimplify
337 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis
338 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis
339 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AssumptionAnalysis
340 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetIRAnalysis
341 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LCSSAPass
342 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager
343 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis
344 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: BasicAA
345 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScopedNoAliasAA
346 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TypeBasedAA
347 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy
348 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis
349 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
350 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass
351 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
352 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
353 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
355 define void @foo(i1 %x, ptr %p1, ptr %p2) {
358 br i1 %x, label %loop, label %exit
361 %tmp1 = load i8, ptr %p2