1 ; The IR below was crafted so as:
2 ; 1) To have a loop, so we create a loop pass manager
3 ; 2) To be "immutable" in the sense that no pass in the standard
4 ; pipeline will modify it.
5 ; Since no transformations take place, we don't expect any analyses
7 ; Any invalidation that shows up here is a bug, unless we started modifying
8 ; the IR, in which case we need to make it immutable harder.
10 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
11 ; RUN: -passes='default<O1>' -S %s 2>&1 \
12 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O1,%llvmcheckext
13 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
14 ; RUN: -passes='default<O2>' -S %s 2>&1 \
15 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O2,CHECK-O23SZ,%llvmcheckext
16 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
17 ; RUN: -passes='default<O3>' -S %s 2>&1 \
18 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,CHECK-O23SZ,%llvmcheckext
19 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
20 ; RUN: -passes='default<Os>' -S %s 2>&1 \
21 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-Os,CHECK-O23SZ,%llvmcheckext
22 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
23 ; RUN: -passes='default<Oz>' -S %s 2>&1 \
24 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-Oz,CHECK-O23SZ,%llvmcheckext
25 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
26 ; RUN: -passes='lto-pre-link<O2>' -S %s 2>&1 \
27 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-LTO,CHECK-O2,CHECK-O23SZ,%llvmcheckext
29 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
30 ; RUN: -passes-ep-peephole='no-op-function' \
31 ; RUN: -passes='default<O3>' -S %s 2>&1 \
32 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-PEEPHOLE,CHECK-O23SZ
33 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
34 ; RUN: -passes-ep-late-loop-optimizations='no-op-loop' \
35 ; RUN: -passes='default<O3>' -S %s 2>&1 \
36 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-LOOP-LATE,CHECK-O23SZ
37 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
38 ; RUN: -passes-ep-loop-optimizer-end='no-op-loop' \
39 ; RUN: -passes='default<O3>' -S %s 2>&1 \
40 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-LOOP-END,CHECK-O23SZ
41 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
42 ; RUN: -passes-ep-scalar-optimizer-late='no-op-function' \
43 ; RUN: -passes='default<O3>' -S %s 2>&1 \
44 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-SCALAR-LATE,CHECK-O23SZ
45 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
46 ; RUN: -passes-ep-cgscc-optimizer-late='no-op-cgscc' \
47 ; RUN: -passes='default<O3>' -S %s 2>&1 \
48 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-CGSCC-LATE,CHECK-O23SZ
49 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
50 ; RUN: -passes-ep-vectorizer-start='no-op-function' \
51 ; RUN: -passes='default<O3>' -S %s 2>&1 \
52 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-VECTORIZER-START,CHECK-O23SZ
53 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
54 ; RUN: -passes-ep-pipeline-start='no-op-module' \
55 ; RUN: -passes='default<O3>' -S %s 2>&1 \
56 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-PIPELINE-START,CHECK-O23SZ
57 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
58 ; RUN: -passes-ep-pipeline-early-simplification='no-op-module' \
59 ; RUN: -passes='default<O3>' -S %s 2>&1 \
60 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-PIPELINE-EARLY-SIMPLIFICATION,CHECK-O23SZ
61 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
62 ; RUN: -passes-ep-pipeline-start='no-op-module' \
63 ; RUN: -passes='lto-pre-link<O3>' -S %s 2>&1 \
64 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-LTO,CHECK-O3,%llvmcheckext,CHECK-EP-PIPELINE-START,CHECK-O23SZ
65 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
66 ; RUN: -passes-ep-optimizer-early='no-op-module' \
67 ; RUN: -passes='default<O3>' -S %s 2>&1 \
68 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-OPTIMIZER-EARLY,CHECK-O23SZ
69 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
70 ; RUN: -passes-ep-optimizer-last='no-op-module' \
71 ; RUN: -passes='default<O3>' -S %s 2>&1 \
72 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,%llvmcheckext,CHECK-EP-OPTIMIZER-LAST,CHECK-O23SZ
74 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
75 ; RUN: -passes='default<O3>' -enable-matrix -S %s 2>&1 \
76 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,CHECK-O23SZ,%llvmcheckext,CHECK-MATRIX
78 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
79 ; RUN: -passes='default<O3>' -enable-merge-functions -S %s 2>&1 \
80 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,CHECK-O23SZ,%llvmcheckext,CHECK-MERGE-FUNCS
82 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
83 ; RUN: -passes='default<O3>' -ir-outliner -S %s 2>&1 \
84 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,CHECK-O23SZ,%llvmcheckext,CHECK-IR-OUTLINER
86 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
87 ; RUN: -passes='default<O3>' -hot-cold-split -S %s 2>&1 \
88 ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,CHECK-O23SZ,%llvmcheckext,CHECK-HOT-COLD-SPLIT
90 ; Suppress FileCheck --allow-unused-prefixes=false diagnostics.
93 ; CHECK-O: Running pass: Annotation2Metadata
94 ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
95 ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass
96 ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
97 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
98 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
99 ; CHECK-O-NEXT: Running pass: CoroEarlyPass
100 ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass
101 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
102 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
103 ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis
104 ; CHECK-O-NEXT: Running pass: SROAPass
105 ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis
106 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
107 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
108 ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass
109 ; CHECK-O-NEXT: Running pass: OpenMPOptPass
110 ; CHECK-EP-PIPELINE-EARLY-SIMPLIFICATION-NEXT: Running pass: NoOpModulePass
111 ; CHECK-O-NEXT: Running pass: IPSCCPPass
112 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
113 ; CHECK-O-NEXT: Running pass: GlobalOptPass
114 ; CHECK-O-NEXT: Running pass: PromotePass
115 ; CHECK-O-NEXT: Running pass: InstCombinePass
116 ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
117 ; CHECK-O-NEXT: Running analysis: AAManager
118 ; CHECK-O-NEXT: Running analysis: BasicAA
119 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
120 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
121 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
122 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
123 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
124 ; CHECK-O-NEXT: Running pass: AlwaysInlinerPass
125 ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis
126 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
127 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
128 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
129 ; CHECK-O-NEXT: Running analysis: GlobalsAA
130 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
131 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
132 ; CHECK-O-NEXT: Invalidating analysis: AAManager
133 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
134 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
135 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
136 ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
137 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
138 ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass
139 ; CHECK-O-NEXT: Running pass: InlinerPass
140 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
141 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
142 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
143 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
144 ; CHECK-EP-CGSCC-LATE-NEXT: Running pass: NoOpCGSCCPass
145 ; CHECK-O-NEXT: Running pass: SROAPass
146 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
147 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
148 ; CHECK-O-NEXT: Running analysis: AAManager
149 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
150 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
151 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
152 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
153 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
154 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
155 ; CHECK-O-NEXT: Running pass: InstCombinePass
156 ; CHECK-O23SZ-NEXT: Running pass: AggressiveInstCombinePass
157 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
158 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
159 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
160 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
161 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
162 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
163 ; CHECK-O-NEXT: Running pass: ReassociatePass
164 ; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
165 ; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis
166 ; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
167 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
168 ; CHECK-O1-NEXT: Running analysis: LoopAnalysis
169 ; CHECK-O-NEXT: Running pass: LCSSAPass
170 ; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
171 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
172 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
173 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
174 ; CHECK-O-NEXT: Running pass: LICM
175 ; CHECK-O-NEXT: Running pass: LoopRotatePass
176 ; CHECK-O-NEXT: Running pass: LICM
177 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
178 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
179 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
180 ; CHECK-O-NEXT: Running pass: InstCombinePass
181 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
182 ; CHECK-O-NEXT: Running pass: LCSSAPass
183 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
184 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
185 ; CHECK-EP-LOOP-LATE-NEXT: Running pass: NoOpLoopPass
186 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
187 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
188 ; CHECK-EP-LOOP-END-NEXT: Running pass: NoOpLoopPass
189 ; CHECK-O-NEXT: Running pass: SROAPass on foo
190 ; CHECK-O23SZ-NEXT: Running pass: VectorCombinePass
191 ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass
192 ; CHECK-O23SZ-NEXT: Running pass: GVNPass
193 ; CHECK-O23SZ-NEXT: Running analysis: MemoryDependenceAnalysis
194 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
195 ; CHECK-O1-NEXT: Running analysis: PostDominatorTreeAnalysis
196 ; CHECK-O-NEXT: Running pass: SCCPPass
197 ; CHECK-O-NEXT: Running pass: BDCEPass
198 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
199 ; CHECK-O-NEXT: Running pass: InstCombinePass
200 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
201 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
202 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
203 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
204 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
205 ; CHECK-O1-NEXT: Running pass: CoroElidePass
206 ; CHECK-O-NEXT: Running pass: ADCEPass
207 ; CHECK-O23SZ-NEXT: Running analysis: PostDominatorTreeAnalysis
208 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
209 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
210 ; CHECK-O23SZ-NEXT: Running pass: MoveAutoInitPass on foo
211 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
212 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
213 ; CHECK-O23SZ-NEXT: Running pass: LICMPass
214 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
215 ; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass
216 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
217 ; CHECK-O-NEXT: Running pass: InstCombinePass
218 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
219 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
220 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
221 ; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
222 ; CHECK-O-NEXT: Running pass: CoroSplitPass
223 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
224 ; CHECK-O-NEXT: Invalidating analysis: ShouldNotRunFunctionPassesAnalysis
225 ; CHECK-O-NEXT: Invalidating analysis: InlineAdvisorAnalysis
226 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
227 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
228 ; CHECK-O-NEXT: Running pass: GlobalOptPass
229 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
230 ; CHECK-DEFAULT-NEXT: Running pass: EliminateAvailableExternallyPass
231 ; CHECK-LTO-NOT: Running pass: EliminateAvailableExternallyPass
232 ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
233 ; CHECK-O-NEXT: Running pass: RecomputeGlobalsAAPass
234 ; CHECK-EP-OPTIMIZER-EARLY: Running pass: NoOpModulePass
235 ; CHECK-O-NEXT: Running pass: Float2IntPass
236 ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass on foo
237 ; CHECK-MATRIX: Running pass: LowerMatrixIntrinsicsPass on f
238 ; CHECK-MATRIX-NEXT: Running pass: EarlyCSEPass on f
239 ; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass
240 ; CHECK-EP-VECTORIZER-START-NEXT: Running pass: NoOpFunctionPass
241 ; CHECK-EXT: Running pass: {{.*}}::Bye on foo
243 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
244 ; CHECK-O-NEXT: Running pass: LCSSAPass
245 ; CHECK-O-NEXT: Running pass: LoopRotatePass
246 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
247 ; CHECK-O-NEXT: Running pass: LoopDistributePass
248 ; CHECK-O-NEXT: Running analysis: LoopAccessAnalysis on foo
249 ; CHECK-O-NEXT: Running pass: InjectTLIMappings
250 ; CHECK-O-NEXT: Running pass: LoopVectorizePass
251 ; CHECK-O-NEXT: Running pass: InferAlignmentPass
252 ; CHECK-O-NEXT: Running pass: LoopLoadEliminationPass
253 ; CHECK-O-NEXT: Running pass: InstCombinePass
254 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
255 ; CHECK-O2-NEXT: Running pass: SLPVectorizerPass
256 ; CHECK-O3-NEXT: Running pass: SLPVectorizerPass
257 ; CHECK-Os-NEXT: Running pass: SLPVectorizerPass
258 ; CHECK-O-NEXT: Running pass: VectorCombinePass
259 ; CHECK-O-NEXT: Running pass: InstCombinePass
260 ; CHECK-O-NEXT: Running pass: LoopUnrollPass
261 ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass
262 ; CHECK-O-NEXT: Running pass: SROAPass
263 ; CHECK-O-NEXT: Running pass: InferAlignmentPass
264 ; CHECK-O-NEXT: Running pass: InstCombinePass
265 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
266 ; CHECK-O-NEXT: Running pass: LCSSAPass
267 ; CHECK-O-NEXT: Running pass: LICMPass
268 ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass
269 ; CHECK-O-NEXT: Running pass: LoopSinkPass
270 ; CHECK-O-NEXT: Running pass: InstSimplifyPass
271 ; CHECK-O-NEXT: Running pass: DivRemPairsPass
272 ; CHECK-O-NEXT: Running pass: TailCallElimPass
273 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
274 ; CHECK-EP-OPTIMIZER-LAST: Running pass: NoOpModulePass
275 ; CHECK-HOT-COLD-SPLIT-NEXT: Running pass: HotColdSplittingPass
276 ; CHECK-IR-OUTLINER-NEXT: Running pass: IROutlinerPass
277 ; CHECK-IR-OUTLINER-NEXT: Running analysis: IRSimilarityAnalysis
278 ; CHECK-MERGE-FUNCS-NEXT: Running pass: MergeFunctionsPass
279 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
280 ; CHECK-O-NEXT: Running pass: ConstantMergePass
281 ; CHECK-DEFAULT-NEXT: Running pass: CGProfilePass
282 ; CHECK-DEFAULT-NEXT: Running pass: RelLookupTableConverterPass
283 ; CHECK-LTO-NOT: Running pass: RelLookupTableConverterPass
284 ; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
285 ; CHECK-LTO-NEXT: Running pass: CanonicalizeAliasesPass
286 ; CHECK-LTO-NEXT: Running pass: NameAnonGlobalPass
287 ; CHECK-O-NEXT: Running pass: PrintModulePass
289 ; Make sure we get the IR back out without changes when we print the module.
290 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
291 ; CHECK-O-NEXT: entry:
292 ; CHECK-O-NEXT: br label %loop
294 ; CHECK-O-NEXT: %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
295 ; CHECK-O-NEXT: %iv.next = add i32 %iv, 1
296 ; CHECK-O-NEXT: tail call void @bar()
297 ; CHECK-O-NEXT: %cmp = icmp eq i32 %iv, %n
298 ; CHECK-O-NEXT: br i1 %cmp, label %exit, label %loop
300 ; CHECK-O-NEXT: ret void
303 declare void @bar() local_unnamed_addr
305 define void @foo(i32 %n) local_unnamed_addr {
309 %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
310 %iv.next = add i32 %iv, 1
311 tail call void @bar()
312 %cmp = icmp eq i32 %iv, %n
313 br i1 %cmp, label %exit, label %loop