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-cfg-preserved=1 -debug-pass-manager \
9 ; RUN: -passes=no-op-module %s 2>&1 \
10 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS
11 ; CHECK-MODULE-PASS: Running pass: NoOpModulePass
13 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
14 ; RUN: -passes=no-op-cgscc %s 2>&1 \
15 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
16 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
17 ; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \
18 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
19 ; CHECK-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
20 ; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
21 ; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
22 ; CHECK-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
23 ; CHECK-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
24 ; CHECK-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
25 ; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
27 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
28 ; RUN: -passes=no-op-function %s 2>&1 \
29 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
30 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
31 ; RUN: -passes='function(no-op-function)' %s 2>&1 \
32 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
33 ; CHECK-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
34 ; CHECK-FUNCTION-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
35 ; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
37 ; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \
38 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
39 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
40 ; CHECK-MODULE-PRINT: Running pass: PrintModulePass
41 ; CHECK-MODULE-PRINT: ModuleID
42 ; CHECK-MODULE-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2)
43 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
45 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='print,verify' %s 2>&1 \
46 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
47 ; CHECK-MODULE-VERIFY: Running pass: PrintModulePass
48 ; CHECK-MODULE-VERIFY: ModuleID
49 ; CHECK-MODULE-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2)
50 ; CHECK-MODULE-VERIFY: Running pass: VerifierPass
52 ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
53 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
54 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
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, i8* %p1, i8* %p2)
59 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
61 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -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, i8* %p1, i8* %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, i8* %p1, i8* %p2) {
72 ; CHECK-NOOP: store i8 42, i8* %p1
73 ; CHECK-NOOP: br i1 %x, label %loop, label %exit
75 ; CHECK-NOOP: %tmp1 = load i8, i8* %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-cfg-preserved=1 -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
93 ; CHECK-NO-VERIFY-NOT: VerifierPass
95 ; RUN: opt -disable-output -debug-pass-manager \
96 ; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
97 ; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES
98 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
99 ; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis
100 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
101 ; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis
102 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
103 ; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis
105 ; Make sure no-op passes that preserve all analyses don't even try to do any
106 ; analysis invalidation.
107 ; RUN: opt -disable-output -debug-pass-manager \
108 ; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
109 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION
110 ; CHECK-NO-OP-INVALIDATION-NOT: Invalidat
112 ; RUN: opt -disable-output -debug-pass-manager \
113 ; RUN: -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
114 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
115 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
116 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
117 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis
119 ; RUN: opt -disable-output -debug-pass-manager \
120 ; RUN: -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \
121 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
122 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
123 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
124 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis
125 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
127 ; RUN: opt -disable-output -debug-pass-manager \
128 ; RUN: -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
129 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
130 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
131 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
132 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis
134 ; RUN: opt -disable-output -debug-pass-manager \
135 ; RUN: -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
136 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
137 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
138 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
139 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis
140 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
142 ; RUN: opt -disable-output -debug-pass-manager \
143 ; RUN: -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \
144 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
145 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
146 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
147 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis
149 ; RUN: opt -disable-output -debug-pass-manager \
150 ; RUN: -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \
151 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
152 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
153 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
154 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis
155 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
157 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
158 ; 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 \
159 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
160 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
161 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
162 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
163 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
164 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
165 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
166 ; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass
167 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis
168 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
169 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
170 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis
171 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
172 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
173 ; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis
174 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
175 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
177 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
178 ; 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 \
179 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
180 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
181 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
182 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
183 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
184 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
185 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
186 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
187 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
188 ; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass
189 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis
190 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
191 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
192 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis
193 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis
194 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
195 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
196 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis
197 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis
198 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
199 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
200 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis
201 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
202 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
204 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
205 ; RUN: -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
206 ; RUN: | FileCheck %s --check-prefix=CHECK-TLI
207 ; CHECK-TLI: Running pass: RequireAnalysisPass
208 ; CHECK-TLI: Running analysis: TargetLibraryAnalysis
209 ; CHECK-TLI: Running pass: InvalidateAllAnalysesPass
210 ; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis
211 ; CHECK-TLI: Running pass: RequireAnalysisPass
212 ; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis
214 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
215 ; RUN: -passes='require<targetir>,invalidate<all>,require<targetir>' \
216 ; RUN: | FileCheck %s --check-prefix=CHECK-TIRA
217 ; CHECK-TIRA: Running pass: RequireAnalysisPass
218 ; CHECK-TIRA: Running analysis: TargetIRAnalysis
219 ; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass
220 ; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis
221 ; CHECK-TIRA: Running pass: RequireAnalysisPass
222 ; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis
224 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
225 ; RUN: -passes='require<domtree>' \
226 ; RUN: | FileCheck %s --check-prefix=CHECK-DT
227 ; CHECK-DT: Running pass: RequireAnalysisPass
228 ; CHECK-DT: Running analysis: DominatorTreeAnalysis
230 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
231 ; RUN: -passes='require<basic-aa>' \
232 ; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA
233 ; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
234 ; CHECK-BASIC-AA: Running analysis: BasicAA
236 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
237 ; RUN: -passes='require<aa>' -aa-pipeline='basic-aa' \
238 ; RUN: | FileCheck %s --check-prefix=CHECK-AA
239 ; CHECK-AA: Running pass: RequireAnalysisPass
240 ; CHECK-AA: Running analysis: AAManager
241 ; CHECK-AA: Running analysis: BasicAA
243 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
244 ; RUN: -passes='require<aa>' -aa-pipeline='default' \
245 ; RUN: | FileCheck %s --check-prefix=CHECK-AA-DEFAULT
246 ; CHECK-AA-DEFAULT: Running pass: RequireAnalysisPass
247 ; CHECK-AA-DEFAULT: Running analysis: AAManager
248 ; CHECK-AA-DEFAULT: Running analysis: BasicAA
249 ; CHECK-AA-DEFAULT: Running analysis: ScopedNoAliasAA
250 ; CHECK-AA-DEFAULT: Running analysis: TypeBasedAA
252 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
253 ; RUN: -passes='require<aa>,invalidate<domtree>,aa-eval' -aa-pipeline='basic-aa' \
254 ; RUN: | FileCheck %s --check-prefix=CHECK-AA-FUNCTION-INVALIDATE
255 ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: RequireAnalysisPass
256 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
257 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
258 ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: InvalidateAnalysisPass
259 ; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis
260 ; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: BasicAA
261 ; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: AAManager
262 ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: AAEvaluator
263 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
264 ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
266 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
267 ; RUN: -passes='require<globals-aa>,function(require<aa>),invalidate<globals-aa>,require<globals-aa>,function(aa-eval)' -aa-pipeline='globals-aa' \
268 ; RUN: | FileCheck %s --check-prefix=CHECK-AA-MODULE-INVALIDATE
269 ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
270 ; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
271 ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
272 ; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager
273 ; CHECK-AA-MODULE-INVALIDATE: Running pass: InvalidateAnalysisPass
274 ; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: GlobalsAA
275 ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
276 ; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
277 ; CHECK-AA-MODULE-INVALIDATE: Running pass: AAEvaluator
279 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
280 ; RUN: -passes='require<memdep>' \
281 ; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP
282 ; CHECK-MEMDEP: Running pass: RequireAnalysisPass
283 ; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis
285 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
286 ; RUN: -passes='require<callgraph>' \
287 ; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH
288 ; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass
289 ; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis
291 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
292 ; RUN: -passes='default<O0>' %s 2>&1 \
293 ; RUN: | FileCheck %s --check-prefix=CHECK-O0 --check-prefix=%llvmcheckext
294 ; CHECK-O0: Running pass: AlwaysInlinerPass
295 ; CHECK-O0-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
296 ; CHECK-O0-NEXT: Running analysis: ProfileSummaryAnalysis
297 ; CHECK-EXT-NEXT: Running pass: {{.*}}Bye
298 ; We don't have checks for CHECK-NOEXT here, but this simplifies the test, while
299 ; avoiding FileCheck complaining about the unused prefix.
300 ; CHECK-NOEXT: {{.*}}
302 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
303 ; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \
304 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS
305 ; CHECK-REPEAT-MODULE-PASS: Running pass: RepeatedPass
306 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
307 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
308 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
310 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
311 ; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \
312 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS
313 ; CHECK-REPEAT-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
314 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
315 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
316 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
317 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
318 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
319 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass
320 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
321 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
322 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
324 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
325 ; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \
326 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS
327 ; CHECK-REPEAT-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
328 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
329 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass
330 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
331 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
332 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
334 ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
335 ; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \
336 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS
337 ; CHECK-REPEAT-LOOP-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
338 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
339 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LoopSimplify
340 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis
341 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis
342 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AssumptionAnalysis
343 ; CHECK-REPEAT-LOOP-PASS-NEXT: Invalidating analysis: PreservedCFGCheckerAnalysis on foo
344 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LCSSAPass
345 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
346 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager
347 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis
348 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: BasicAA
349 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScopedNoAliasAA
350 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TypeBasedAA
351 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy
352 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis
353 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetIRAnalysis
354 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
355 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass
356 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
357 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
358 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
360 define void @foo(i1 %x, i8* %p1, i8* %p2) {
363 br i1 %x, label %loop, label %exit
366 %tmp1 = load i8, i8* %p2