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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-NO-FUNC-SPEC,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-NO-FUNC-SPEC,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-NO-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-NO-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC,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-FUNC-SPEC-NEXT: Running analysis: LoopAnalysis
113 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
114 ; CHECK-O-NEXT: Running pass: GlobalOptPass
115 ; CHECK-O-NEXT: Running pass: PromotePass
116 ; CHECK-O-NEXT: Running pass: InstCombinePass
117 ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
118 ; CHECK-O-NEXT: Running analysis: AAManager
119 ; CHECK-O-NEXT: Running analysis: BasicAA
120 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
121 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
122 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
123 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
124 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
125 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
126 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
127 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
128 ; CHECK-O-NEXT: Running analysis: GlobalsAA
129 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
130 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
131 ; CHECK-O-NEXT: Invalidating analysis: AAManager
132 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
133 ; CHECK-O-NEXT: Running analysis: 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: InlinerPass
141 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
142 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
143 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
144 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
145 ; CHECK-EP-CGSCC-LATE-NEXT: Running pass: NoOpCGSCCPass
146 ; CHECK-O-NEXT: Running pass: SROAPass
147 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
148 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
149 ; CHECK-O-NEXT: Running analysis: AAManager
150 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
151 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
152 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
153 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
154 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
155 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
156 ; CHECK-O-NEXT: Running pass: InstCombinePass
157 ; CHECK-O23SZ-NEXT: Running pass: AggressiveInstCombinePass
158 ; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
159 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
160 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
161 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
162 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
163 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
164 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
165 ; CHECK-O-NEXT: Running pass: ReassociatePass
166 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
167 ; CHECK-NO-FUNC-SPEC-NEXT: Running analysis: LoopAnalysis
168 ; CHECK-O-NEXT: Running pass: LCSSAPass
169 ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
170 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
171 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
172 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
173 ; CHECK-O-NEXT: Running pass: LICM
174 ; CHECK-O-NEXT: Running pass: LoopRotatePass
175 ; CHECK-O-NEXT: Running pass: LICM
176 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
177 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
178 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
179 ; CHECK-O-NEXT: Running pass: InstCombinePass
180 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
181 ; CHECK-O-NEXT: Running pass: LCSSAPass
182 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
183 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
184 ; CHECK-EP-LOOP-LATE-NEXT: Running pass: NoOpLoopPass
185 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
186 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
187 ; CHECK-EP-LOOP-END-NEXT: Running pass: NoOpLoopPass
188 ; CHECK-O-NEXT: Running pass: SROAPass on foo
189 ; CHECK-O23SZ-NEXT: Running pass: VectorCombinePass
190 ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass
191 ; CHECK-O23SZ-NEXT: Running pass: GVNPass
192 ; CHECK-O23SZ-NEXT: Running analysis: MemoryDependenceAnalysis
193 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
194 ; CHECK-O-NEXT: Running pass: SCCPPass
195 ; CHECK-O-NEXT: Running pass: BDCEPass
196 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
197 ; CHECK-O-NEXT: Running pass: InstCombinePass
198 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
199 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
200 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
201 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
202 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
203 ; CHECK-O1-NEXT: Running pass: CoroElidePass
204 ; CHECK-O-NEXT: Running pass: ADCEPass
205 ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis
206 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
207 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
208 ; CHECK-O23SZ-NEXT: Running pass: MoveAutoInitPass on foo
209 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
210 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
211 ; CHECK-O23SZ-NEXT: Running pass: LICMPass
212 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
213 ; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass
214 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
215 ; CHECK-O-NEXT: Running pass: InstCombinePass
216 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
217 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
218 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
219 ; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
220 ; CHECK-O-NEXT: Running pass: CoroSplitPass
221 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
222 ; CHECK-O-NEXT: Invalidating analysis: ShouldNotRunFunctionPassesAnalysis
223 ; CHECK-O-NEXT: Invalidating analysis: InlineAdvisorAnalysis
224 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
225 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
226 ; CHECK-O-NEXT: Running pass: GlobalOptPass
227 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
228 ; CHECK-DEFAULT-NEXT: Running pass: EliminateAvailableExternallyPass
229 ; CHECK-LTO-NOT: Running pass: EliminateAvailableExternallyPass
230 ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
231 ; CHECK-O-NEXT: Running pass: RecomputeGlobalsAAPass
232 ; CHECK-EP-OPTIMIZER-EARLY: Running pass: NoOpModulePass
233 ; CHECK-O-NEXT: Running pass: Float2IntPass
234 ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass on foo
235 ; CHECK-MATRIX: Running pass: LowerMatrixIntrinsicsPass on f
236 ; CHECK-MATRIX-NEXT: Running pass: EarlyCSEPass on f
237 ; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass
238 ; CHECK-EP-VECTORIZER-START-NEXT: Running pass: NoOpFunctionPass
239 ; CHECK-EXT: Running pass: {{.*}}::Bye on foo
241 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
242 ; CHECK-O-NEXT: Running pass: LCSSAPass
243 ; CHECK-O-NEXT: Running pass: LoopRotatePass
244 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
245 ; CHECK-O-NEXT: Running pass: LoopDistributePass
246 ; CHECK-O-NEXT: Running analysis: LoopAccessAnalysis on foo
247 ; CHECK-O-NEXT: Running pass: InjectTLIMappings
248 ; CHECK-O-NEXT: Running pass: LoopVectorizePass
249 ; CHECK-O-NEXT: Running pass: LoopLoadEliminationPass
250 ; CHECK-O-NEXT: Running pass: InstCombinePass
251 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
252 ; CHECK-O2-NEXT: Running pass: SLPVectorizerPass
253 ; CHECK-O3-NEXT: Running pass: SLPVectorizerPass
254 ; CHECK-Os-NEXT: Running pass: SLPVectorizerPass
255 ; CHECK-O-NEXT: Running pass: VectorCombinePass
256 ; CHECK-O-NEXT: Running pass: InstCombinePass
257 ; CHECK-O-NEXT: Running pass: LoopUnrollPass
258 ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass
259 ; CHECK-O-NEXT: Running pass: SROAPass
260 ; CHECK-O-NEXT: Running pass: InstCombinePass
261 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
262 ; CHECK-O-NEXT: Running pass: LCSSAPass
263 ; CHECK-O-NEXT: Running pass: LICMPass
264 ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass
265 ; CHECK-O-NEXT: Running pass: LoopSinkPass
266 ; CHECK-O-NEXT: Running pass: InstSimplifyPass
267 ; CHECK-O-NEXT: Running pass: DivRemPairsPass
268 ; CHECK-O-NEXT: Running pass: TailCallElimPass
269 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
270 ; CHECK-EP-OPTIMIZER-LAST: Running pass: NoOpModulePass
271 ; CHECK-HOT-COLD-SPLIT-NEXT: Running pass: HotColdSplittingPass
272 ; CHECK-IR-OUTLINER-NEXT: Running pass: IROutlinerPass
273 ; CHECK-IR-OUTLINER-NEXT: Running analysis: IRSimilarityAnalysis
274 ; CHECK-MERGE-FUNCS-NEXT: Running pass: MergeFunctionsPass
275 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
276 ; CHECK-O-NEXT: Running pass: ConstantMergePass
277 ; CHECK-DEFAULT-NEXT: Running pass: CGProfilePass
278 ; CHECK-DEFAULT-NEXT: Running pass: RelLookupTableConverterPass
279 ; CHECK-LTO-NOT: Running pass: RelLookupTableConverterPass
280 ; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
281 ; CHECK-LTO-NEXT: Running pass: CanonicalizeAliasesPass
282 ; CHECK-LTO-NEXT: Running pass: NameAnonGlobalPass
283 ; CHECK-O-NEXT: Running pass: PrintModulePass
285 ; Make sure we get the IR back out without changes when we print the module.
286 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
287 ; CHECK-O-NEXT: entry:
288 ; CHECK-O-NEXT: br label %loop
290 ; CHECK-O-NEXT: %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
291 ; CHECK-O-NEXT: %iv.next = add i32 %iv, 1
292 ; CHECK-O-NEXT: tail call void @bar()
293 ; CHECK-O-NEXT: %cmp = icmp eq i32 %iv, %n
294 ; CHECK-O-NEXT: br i1 %cmp, label %exit, label %loop
296 ; CHECK-O-NEXT: ret void
299 declare void @bar() local_unnamed_addr
301 define void @foo(i32 %n) local_unnamed_addr {
305 %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
306 %iv.next = add i32 %iv, 1
307 tail call void @bar()
308 %cmp = icmp eq i32 %iv, %n
309 br i1 %cmp, label %exit, label %loop