[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / Other / new-pm-thinlto-defaults.ll
blob60eb9a7b6a0133f308357f592fb2ebfc8a7eed52
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
6 ; to be invalidated.
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 ; Prelink pipelines:
11 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
12 ; RUN:     -passes='thinlto-pre-link<O1>' -S %s 2>&1 \
13 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS
14 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
15 ; RUN:     -passes='thinlto-pre-link<O2>' -S  %s 2>&1 \
16 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS
17 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
18 ; RUN:     -passes='thinlto-pre-link<O3>' -S -passes-ep-pipeline-start='no-op-module' %s 2>&1 \
19 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-EP-PIPELINE-START
20 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
21 ; RUN:     -passes='thinlto-pre-link<Os>' -S %s 2>&1 \
22 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS
23 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
24 ; RUN:     -passes='thinlto-pre-link<Oz>' -S %s 2>&1 \
25 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS
26 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager -new-pm-debug-info-for-profiling \
27 ; RUN:     -passes='thinlto-pre-link<O2>' -S  %s 2>&1 \
28 ; RUN:     | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-PRELINK-O
30 ; Postlink pipelines:
31 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
32 ; RUN:     -passes='thinlto<O1>' -S %s 2>&1 \
33 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-POSTLINK-O,%llvmcheckext
34 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
35 ; RUN:     -passes='thinlto<O2>' -S  %s 2>&1 \
36 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O2
37 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager -passes-ep-pipeline-start='no-op-module' \
38 ; RUN:     -passes='thinlto<O3>' -S  %s 2>&1 \
39 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O3
40 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
41 ; RUN:     -passes='thinlto<Os>' -S %s 2>&1 \
42 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-Os
43 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
44 ; RUN:     -passes='thinlto<Oz>' -S %s 2>&1 \
45 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext
46 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager -new-pm-debug-info-for-profiling \
47 ; RUN:     -passes='thinlto<O2>' -S  %s 2>&1 \
48 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O2
50 ; Suppress FileCheck --allow-unused-prefixes=false diagnostics.
51 ; CHECK-NOEXT: {{^}}
53 ; CHECK-O: Running pass: Annotation2Metadata
54 ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
55 ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass
56 ; CHECK-DIS-NEXT: Running analysis: InnerAnalysisManagerProxy
57 ; CHECK-DIS-NEXT: Running pass: AddDiscriminatorsPass
58 ; CHECK-POSTLINK-O-NEXT: Running pass: PGOIndirectCallPromotion
59 ; CHECK-POSTLINK-O-NEXT: Running analysis: ProfileSummaryAnalysis
60 ; CHECK-POSTLINK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
61 ; CHECK-POSTLINK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
62 ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
63 ; CHECK-PRELINK-O-NODIS-NEXT: Running analysis: InnerAnalysisManagerProxy
64 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
65 ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass
66 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
67 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
68 ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis
69 ; CHECK-O-NEXT: Running pass: SROA
70 ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis
71 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
72 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
73 ; CHECK-O-NEXT: Running pass: CoroEarlyPass
74 ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass
75 ; CHECK-O-NEXT: Running pass: OpenMPOptPass
76 ; CHECK-POSTLINK-O-NEXT: Running pass: LowerTypeTestsPass
77 ; CHECK-O-NEXT: Running pass: IPSCCPPass
78 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
79 ; CHECK-O-NEXT: Running pass: GlobalOptPass
80 ; CHECK-O-NEXT: Running pass: PromotePass
81 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
82 ; CHECK-O-NEXT: Running pass: InstCombinePass
83 ; CHECK-PRELINK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
84 ; CHECK-O-NEXT: Running analysis: AAManager
85 ; CHECK-O-NEXT: Running analysis: BasicAA
86 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
87 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
88 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
89 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
90 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
91 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
92 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
93 ; CHECK-O-NEXT: Running analysis: GlobalsAA
94 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
95 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
96 ; CHECK-O-NEXT: Invalidating analysis: AAManager
97 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
98 ; CHECK-PRELINK-O-NEXT: Running analysis: ProfileSummaryAnalysis
99 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
100 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
101 ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
102 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
103 ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass
104 ; CHECK-O-NEXT: Running pass: InlinerPass
105 ; CHECK-O-NEXT: Running pass: InlinerPass
106 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
107 ; CHECK-O-NEXT: Running analysis: AAManager
108 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
109 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
110 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
111 ; CHECK-O-NEXT: Running pass: SROA
112 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
113 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
114 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
115 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
116 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
117 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
118 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
119 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
120 ; CHECK-O3-NEXT: Running pass: AggressiveInstCombinePass
121 ; CHECK-O-NEXT: Running pass: InstCombinePass
122 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
123 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
124 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
125 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
126 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
127 ; CHECK-O-NEXT: Running pass: ReassociatePass
128 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
129 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
130 ; CHECK-O-NEXT: Running analysis: LoopAnalysis
131 ; CHECK-O-NEXT: Running pass: LCSSAPass
132 ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
133 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
134 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
135 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
136 ; CHECK-O-NEXT: Running pass: LICM
137 ; CHECK-O-NEXT: Running pass: LoopRotatePass
138 ; CHECK-O-NEXT: Running pass: LICM
139 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
140 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
141 ; CHECK-O-NEXT: Running pass: InstCombinePass
142 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
143 ; CHECK-O-NEXT: Running pass: LCSSAPass
144 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
145 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
146 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
147 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
148 ; CHECK-O-NEXT: Running pass: SROA on foo
149 ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
150 ; CHECK-Os-NEXT: Running pass: GVN
151 ; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis
152 ; CHECK-Os-NEXT: Running analysis: PhiValuesAnalysis
153 ; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
154 ; CHECK-Oz-NEXT: Running pass: GVN
155 ; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis
156 ; CHECK-Oz-NEXT: Running analysis: PhiValuesAnalysis
157 ; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
158 ; CHECK-O2-NEXT: Running pass: GVN
159 ; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
160 ; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis
161 ; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
162 ; CHECK-O3-NEXT: Running pass: GVN
163 ; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis
164 ; CHECK-O3-NEXT: Running analysis: PhiValuesAnalysis
165 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
166 ; CHECK-O-NEXT: Running pass: SCCPPass
167 ; CHECK-O-NEXT: Running pass: BDCEPass
168 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
169 ; CHECK-O-NEXT: Running pass: InstCombinePass
170 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
171 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
172 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
173 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
174 ; CHECK-O1-NEXT: Running pass: CoroElidePass
175 ; CHECK-O-NEXT: Running pass: ADCEPass
176 ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis
177 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
178 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
179 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
180 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
181 ; CHECK-O23SZ-NEXT: Running pass: LICMPass on Loop at depth 1 containing: %loop
182 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
183 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
184 ; CHECK-O-NEXT: Running pass: InstCombinePass
185 ; CHECK-O-NEXT: Running pass: CoroSplitPass
186 ; CHECK-PRELINK-O-NEXT: Running pass: GlobalOptPass
187 ; CHECK-POSTLINK-O-NEXT: Running pass: GlobalOptPass
188 ; CHECK-POSTLINK-O-NEXT: Running pass: GlobalDCEPass
189 ; CHECK-POSTLINK-O-NEXT: Running pass: EliminateAvailableExternallyPass
190 ; CHECK-POSTLINK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
191 ; CHECK-POSTLINK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
192 ; CHECK-POSTLINK-O-NEXT: Running pass: Float2IntPass
193 ; CHECK-POSTLINK-O-NEXT: Running pass: LowerConstantIntrinsicsPass
194 ; CHECK-EXT: Running pass: {{.*}}::Bye
195 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopSimplifyPass
196 ; CHECK-POSTLINK-O-NEXT: Running pass: LCSSAPass
197 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopRotatePass
198 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopDistributePass
199 ; CHECK-POSTLINK-O-NEXT: Running pass: InjectTLIMappings
200 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopVectorizePass
201 ; CHECK-POSTLINK-O-NEXT: Running analysis: BlockFrequencyAnalysis
202 ; CHECK-POSTLINK-O-NEXT: Running analysis: BranchProbabilityAnalysis
203 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopLoadEliminationPass
204 ; CHECK-POSTLINK-O-NEXT: Running analysis: LoopAccessAnalysis
205 ; CHECK-POSTLINK-O-NEXT: Running pass: InstCombinePass
206 ; CHECK-POSTLINK-O-NEXT: Running pass: SimplifyCFGPass
207 ; CHECK-POSTLINK-O2-NEXT: Running pass: SLPVectorizerPass
208 ; CHECK-POSTLINK-O3-NEXT: Running pass: SLPVectorizerPass
209 ; CHECK-POSTLINK-Os-NEXT: Running pass: SLPVectorizerPass
210 ; CHECK-POSTLINK-O-NEXT: Running pass: VectorCombinePass
211 ; CHECK-POSTLINK-O-NEXT: Running pass: InstCombinePass
212 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopUnrollPass
213 ; CHECK-POSTLINK-O-NEXT: Running pass: WarnMissedTransformationsPass
214 ; CHECK-POSTLINK-O-NEXT: Running pass: InstCombinePass
215 ; CHECK-POSTLINK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
216 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopSimplifyPass
217 ; CHECK-POSTLINK-O-NEXT: Running pass: LCSSAPass
218 ; CHECK-POSTLINK-O-NEXT: Running pass: LICMPass
219 ; CHECK-POSTLINK-O-NEXT: Running pass: AlignmentFromAssumptionsPass
220 ; CHECK-POSTLINK-O-NEXT: Running pass: LoopSinkPass
221 ; CHECK-POSTLINK-O-NEXT: Running pass: InstSimplifyPass
222 ; CHECK-POSTLINK-O-NEXT: Running pass: DivRemPairsPass
223 ; CHECK-POSTLINK-O-NEXT: Running pass: SimplifyCFGPass
224 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
225 ; CHECK-POSTLINK-O-NEXT: Running pass: CGProfilePass
226 ; CHECK-POSTLINK-O-NEXT: Running pass: GlobalDCEPass
227 ; CHECK-POSTLINK-O-NEXT: Running pass: ConstantMergePass
228 ; CHECK-POSTLINK-O-NEXT: Running pass: RelLookupTableConverterPass
229 ; CHECK-POSTLINK-O-NEXT: Running analysis: TargetIRAnalysis
230 ; CHECK-O-NEXT:          Running pass: AnnotationRemarksPass on foo
231 ; CHECK-PRELINK-O-NEXT: Running pass: CanonicalizeAliasesPass
232 ; CHECK-PRELINK-O-NEXT: Running pass: NameAnonGlobalPass
233 ; CHECK-O-NEXT: Running pass: PrintModulePass
235 ; Make sure we get the IR back out without changes when we print the module.
236 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
237 ; CHECK-O-NEXT: entry:
238 ; CHECK-O-NEXT:   br label %loop
239 ; CHECK-O:      loop:
240 ; CHECK-O-NEXT:   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
241 ; CHECK-O-NEXT:   %iv.next = add i32 %iv, 1
242 ; CHECK-O-NEXT:   tail call void @bar()
243 ; CHECK-O-NEXT:   %cmp = icmp eq i32 %iv, %n
244 ; CHECK-O-NEXT:   br i1 %cmp, label %exit, label %loop
245 ; CHECK-O:      exit:
246 ; CHECK-O-NEXT:   ret void
247 ; CHECK-O-NEXT: }
250 declare void @bar() local_unnamed_addr
252 define void @foo(i32 %n) local_unnamed_addr {
253 entry:
254   br label %loop
255 loop:
256   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
257   %iv.next = add i32 %iv, 1
258   tail call void @bar()
259   %cmp = icmp eq i32 %iv, %n
260   br i1 %cmp, label %exit, label %loop
261 exit:
262   ret void