[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
[llvm-project.git] / llvm / test / Other / new-pm-thinlto-postlink-pgo-defaults.ll
blobc82c34f7ff01e77925077cfa68c9a4801bf9dcd4
1 ; Validate ThinLTO post link pipeline when we have instrumentation PGO
3 ; Postlink pipelines:
4 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
5 ; RUN:     -passes='thinlto<O1>' -S %s 2>&1 \
6 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,%llvmcheckext
7 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
8 ; RUN:     -passes='thinlto<O2>' -S  %s 2>&1 \
9 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext
10 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager -passes-ep-pipeline-start='no-op-module' \
11 ; RUN:     -passes='thinlto<O3>' -S  %s 2>&1 \
12 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,%llvmcheckext
13 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
14 ; RUN:     -passes='thinlto<Os>' -S %s 2>&1 \
15 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,%llvmcheckext
16 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
17 ; RUN:     -passes='thinlto<Oz>' -S %s 2>&1 \
18 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O23SZ,%llvmcheckext
19 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager -debug-info-for-profiling \
20 ; RUN:     -passes='thinlto<O2>' -S  %s 2>&1 \
21 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext
23 ; Suppress FileCheck --allow-unused-prefixes=false diagnostics.
24 ; CHECK-NOEXT: {{^}}
26 ; CHECK-EP-PIPELINE-START: Running pass: NoOpModulePass
27 ; CHECK-O: Running pass: PGOIndirectCallPromotion
28 ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis
29 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
30 ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
31 ; CHECK-O-NEXT: Running pass: OpenMPOptPass
32 ; CHECK-O-NEXT: Running pass: LowerTypeTestsPass
33 ; CHECK-O-NEXT: Running pass: IPSCCPPass
34 ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis
35 ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis
36 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
37 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
38 ; CHECK-O-NEXT: Running pass: GlobalOptPass
39 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
40 ; CHECK-O-NEXT: Running pass: PromotePass
41 ; CHECK-O-NEXT: Running pass: InstCombinePass
42 ; CHECK-O-NEXT: Running analysis: LastRunTrackingAnalysis
43 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
44 ; CHECK-O-NEXT: Running analysis: AAManager
45 ; CHECK-O-NEXT: Running analysis: BasicAA
46 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
47 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
48 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
49 ; CHECK-O-NEXT: Running analysis: BlockFrequencyAnalysis on foo
50 ; CHECK-O-NEXT: Running analysis: BranchProbabilityAnalysis on foo
51 ; CHECK-O-NEXT: Running analysis: LoopAnalysis on foo
52 ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo
53 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
54 ; CHECK-O-NEXT: Running pass: AlwaysInlinerPass
55 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
56 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
57 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
58 ; CHECK-O-NEXT: Running analysis: GlobalsAA
59 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
60 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
61 ; CHECK-O-NEXT: Invalidating analysis: AAManager
62 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
63 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
64 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
65 ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
66 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
67 ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass
68 ; CHECK-O-NEXT: Running pass: InlinerPass
69 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
70 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
71 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass
72 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass
73 ; CHECK-O-NEXT: Running pass: SROAPass
74 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
75 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
76 ; CHECK-O-NEXT: Running analysis: AAManager
77 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
78 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
79 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
80 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
81 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
82 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
83 ; CHECK-O-NEXT: Running pass: InstCombinePass
84 ; CHECK-O23SZ-NEXT: Running pass: AggressiveInstCombinePass
85 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
86 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
87 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
88 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
89 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
90 ; CHECK-O-NEXT: Running pass: ReassociatePass
91 ; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
92 ; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
93 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
94 ; CHECK-O-NEXT: Running pass: LCSSAPass
95 ; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
96 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
97 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
98 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
99 ; CHECK-O-NEXT: Running pass: LICM
100 ; CHECK-O-NEXT: Running pass: LoopRotatePass
101 ; CHECK-O-NEXT: Running pass: LICM
102 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
103 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
104 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
105 ; CHECK-O-NEXT: Running pass: InstCombinePass
106 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
107 ; CHECK-O-NEXT: Running pass: LCSSAPass
108 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
109 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
110 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
111 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
112 ; CHECK-O-NEXT: Running pass: SROAPass on foo
113 ; CHECK-O23SZ-NEXT: Running pass: VectorCombinePass
114 ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass
115 ; CHECK-O23SZ-NEXT: Running pass: GVNPass
116 ; CHECK-O23SZ-NEXT: Running analysis: MemoryDependenceAnalysis
117 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
118 ; CHECK-O-NEXT: Running pass: SCCPPass
119 ; CHECK-O-NEXT: Running pass: BDCEPass
120 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
121 ; CHECK-O-NEXT: Running pass: InstCombinePass
122 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
123 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
124 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
125 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
126 ; CHECK-O1-NEXT: Running pass: CoroElidePass
127 ; CHECK-O-NEXT: Running pass: ADCEPass
128 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
129 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
130 ; CHECK-O23SZ-NEXT: Running pass: MoveAutoInitPass on foo
131 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
132 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
133 ; CHECK-O23SZ-NEXT: Running pass: LICMPass
134 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
135 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
136 ; CHECK-O-NEXT: Running pass: InstCombinePass
137 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
138 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
139 ; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
140 ; CHECK-O-NEXT: Running pass: CoroSplitPass
141 ; CHECK-O-NEXT: Running pass: CoroAnnotationElidePass
142 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
143 ; CHECK-O-NEXT: Invalidating analysis: ShouldNotRunFunctionPassesAnalysis
144 ; CHECK-O-NEXT: Invalidating analysis: InlineAdvisorAnalysis
145 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
146 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
147 ; CHECK-O-NEXT: Running pass: GlobalOptPass
148 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
149 ; CHECK-O-NEXT: Running pass: EliminateAvailableExternallyPass
150 ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
151 ; CHECK-O-NEXT: Running pass: RecomputeGlobalsAAPass
152 ; CHECK-O-NEXT: Running pass: Float2IntPass
153 ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass
154 ; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass
155 ; CHECK-O3-NEXT: Running analysis: RegionInfoAnalysis
156 ; CHECK-O3-NEXT: Running analysis: DominanceFrontierAnalysis
157 ; CHECK-EXT: Running pass: {{.*}}::Bye
158 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass on foo
159 ; CHECK-O-NEXT: Running pass: LCSSAPass on foo
160 ; CHECK-O-NEXT: Running pass: LoopRotatePass
161 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
162 ; CHECK-O-NEXT: Running pass: LoopDistributePass
163 ; CHECK-O-NEXT: Running analysis: LoopAccessAnalysis on foo
164 ; CHECK-O-NEXT: Running pass: InjectTLIMappings
165 ; CHECK-O-NEXT: Running pass: LoopVectorizePass
166 ; CHECK-O-NEXT: Running pass: InferAlignmentPass
167 ; CHECK-O-NEXT: Running pass: LoopLoadEliminationPass
168 ; CHECK-O-NEXT: Running pass: InstCombinePass
169 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
170 ; CHECK-O2-NEXT: Running pass: SLPVectorizerPass
171 ; CHECK-O3-NEXT: Running pass: SLPVectorizerPass
172 ; CHECK-Os-NEXT: Running pass: SLPVectorizerPass
173 ; CHECK-O-NEXT: Running pass: VectorCombinePass
174 ; CHECK-O-NEXT: Running pass: InstCombinePass
175 ; CHECK-O-NEXT: Running pass: LoopUnrollPass
176 ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass
177 ; CHECK-O-NEXT: Running pass: SROAPass
178 ; CHECK-O-NEXT: Running pass: InferAlignmentPass
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: LICMPass
183 ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass
184 ; CHECK-O-NEXT: Running pass: LoopSinkPass
185 ; CHECK-O-NEXT: Running pass: InstSimplifyPass
186 ; CHECK-O-NEXT: Running pass: DivRemPairsPass
187 ; CHECK-O-NEXT: Running pass: TailCallElimPass
188 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
189 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
190 ; CHECK-O-NEXT: Running pass: ConstantMergePass
191 ; CHECK-O-NEXT: Running pass: CGProfilePass
192 ; CHECK-O-NEXT: Running pass: RelLookupTableConverterPass
193 ; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
194 ; CHECK-O-NEXT: Running pass: PrintModulePass
196 ; Make sure we get the IR back out without changes when we print the module.
197 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
198 ; CHECK-O-NEXT: entry:
199 ; CHECK-O-NEXT:   br label %loop
200 ; CHECK-O:      loop:
201 ; CHECK-O-NEXT:   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
202 ; CHECK-O-NEXT:   %iv.next = add i32 %iv, 1
203 ; CHECK-O-NEXT:   tail call void @bar()
204 ; CHECK-O-NEXT:   %cmp = icmp eq i32 %iv, %n
205 ; CHECK-O-NEXT:   br i1 %cmp, label %exit, label %loop
206 ; CHECK-O:      exit:
207 ; CHECK-O-NEXT:   ret void
208 ; CHECK-O-NEXT: }
210 ; Ignore a bunch of intervening metadata containing profile data.
213 declare void @bar() local_unnamed_addr
215 define void @foo(i32 %n) local_unnamed_addr {
216 entry:
217   br label %loop
218 loop:
219   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
220   %iv.next = add i32 %iv, 1
221   tail call void @bar()
222   %cmp = icmp eq i32 %iv, %n
223   br i1 %cmp, label %exit, label %loop
224 exit:
225   ret void
228 !llvm.module.flags = !{!0}
230 !0 = !{i32 1, !"ProfileSummary", !1}
231 !1 = !{!2, !3, !4, !5, !6, !7, !8, !9}
232 !2 = !{!"ProfileFormat", !"InstrProf"}
233 !3 = !{!"TotalCount", i64 0}
234 !4 = !{!"MaxCount", i64 0}
235 !5 = !{!"MaxInternalCount", i64 0}
236 !6 = !{!"MaxFunctionCount", i64 0}
237 !7 = !{!"NumCounts", i64 0}
238 !8 = !{!"NumFunctions", i64 0}
239 !9 = !{!"DetailedSummary", !10}
240 !10 = !{!11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26}
241 !11 = !{i32 10000, i64 0, i32 0}
242 !12 = !{i32 100000, i64 0, i32 0}
243 !13 = !{i32 200000, i64 0, i32 0}
244 !14 = !{i32 300000, i64 0, i32 0}
245 !15 = !{i32 400000, i64 0, i32 0}
246 !16 = !{i32 500000, i64 0, i32 0}
247 !17 = !{i32 600000, i64 0, i32 0}
248 !18 = !{i32 700000, i64 0, i32 0}
249 !19 = !{i32 800000, i64 0, i32 0}
250 !20 = !{i32 900000, i64 0, i32 0}
251 !21 = !{i32 950000, i64 0, i32 0}
252 !22 = !{i32 990000, i64 0, i32 0}
253 !23 = !{i32 999000, i64 0, i32 0}
254 !24 = !{i32 999900, i64 0, i32 0}
255 !25 = !{i32 999990, i64 0, i32 0}
256 !26 = !{i32 999999, i64 0, i32 0}