[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / Other / new-pm-defaults.ll
blob6a372ffac38c3f0300275d1cce35bb294ff0b216
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 ; RUN: opt -disable-verify -verify-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -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-cfg-preserved=1 -debug-pass-manager \
66 ; RUN:     -passes-ep-optimizer-last='no-op-function' \
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-LAST,CHECK-O23SZ
70 ; RUN: opt -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
71 ; RUN:     -passes='default<O3>' -enable-matrix -S  %s 2>&1 \
72 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O3,CHECK-O23SZ,%llvmcheckext,CHECK-MATRIX
74 ; Suppress FileCheck --allow-unused-prefixes=false diagnostics.
75 ; CHECK-Oz: {{^}}
77 ; CHECK-O: Running pass: Annotation2Metadata
78 ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
79 ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass
80 ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
81 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
82 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
83 ; CHECK-O-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
84 ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass
85 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
86 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
87 ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis
88 ; CHECK-O-NEXT: Running pass: SROA
89 ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis
90 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
91 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
92 ; CHECK-O-NEXT: Running pass: CoroEarlyPass
93 ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass
94 ; CHECK-O-NEXT: Running pass: OpenMPOptPass
95 ; CHECK-EP-PIPELINE-EARLY-SIMPLIFICATION-NEXT: Running pass: NoOpModulePass
96 ; CHECK-O-NEXT: Running pass: IPSCCPPass
97 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
98 ; CHECK-O-NEXT: Running pass: GlobalOptPass
99 ; CHECK-O-NEXT: Running pass: PromotePass
100 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
101 ; CHECK-O-NEXT: Running pass: InstCombinePass
102 ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
103 ; CHECK-O-NEXT: Running analysis: AAManager
104 ; CHECK-O-NEXT: Running analysis: BasicAA
105 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
106 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
107 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
108 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
109 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
110 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
111 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
112 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
113 ; CHECK-O-NEXT: Running analysis: GlobalsAA
114 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
115 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
116 ; CHECK-O-NEXT: Invalidating analysis: AAManager
117 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
118 ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis
119 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
120 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
121 ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
122 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
123 ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass
124 ; CHECK-O-NEXT: Running pass: InlinerPass
125 ; CHECK-O-NEXT: Running pass: InlinerPass
126 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
127 ; CHECK-O-NEXT: Running analysis: AAManager
128 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
129 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
130 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
131 ; CHECK-EP-CGSCC-LATE-NEXT: Running pass: NoOpCGSCCPass
132 ; CHECK-O-NEXT: Running pass: SROA
133 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
134 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
135 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
136 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
137 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
138 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
139 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
140 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
141 ; CHECK-O3-NEXT: AggressiveInstCombinePass
142 ; CHECK-O-NEXT: Running pass: InstCombinePass
143 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
144 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
145 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
146 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
147 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
148 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
149 ; CHECK-O-NEXT: Running pass: ReassociatePass
150 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
151 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
152 ; CHECK-O-NEXT: Running analysis: LoopAnalysis
153 ; CHECK-O-NEXT: Running pass: LCSSAPass
154 ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
155 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
156 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
157 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
158 ; CHECK-O-NEXT: Running pass: LICM
159 ; CHECK-O-NEXT: Running pass: LoopRotatePass
160 ; CHECK-O-NEXT: Running pass: LICM
161 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
162 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
163 ; CHECK-O-NEXT: Running pass: InstCombinePass
164 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
165 ; CHECK-O-NEXT: Running pass: LCSSAPass
166 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
167 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
168 ; CHECK-EP-LOOP-LATE-NEXT: Running pass: NoOpLoopPass
169 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
170 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
171 ; CHECK-EP-LOOP-END-NEXT: Running pass: NoOpLoopPass
172 ; CHECK-O-NEXT: Running pass: SROA on foo
173 ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass
174 ; CHECK-O23SZ-NEXT: Running pass: GVN
175 ; CHECK-O23SZ-NEXT: Running analysis: MemoryDependenceAnalysis
176 ; CHECK-O23SZ-NEXT: Running analysis: PhiValuesAnalysis
177 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
178 ; CHECK-O-NEXT: Running pass: SCCPPass
179 ; CHECK-O-NEXT: Running pass: BDCEPass
180 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
181 ; CHECK-O-NEXT: Running pass: InstCombinePass
182 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
183 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
184 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
185 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
186 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
187 ; CHECK-O1-NEXT: Running pass: CoroElidePass
188 ; CHECK-O-NEXT: Running pass: ADCEPass
189 ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis
190 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
191 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
192 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
193 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
194 ; CHECK-O23SZ-NEXT: Running pass: LICMPass
195 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
196 ; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass
197 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
198 ; CHECK-O-NEXT: Running pass: InstCombinePass
199 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
200 ; CHECK-O-NEXT: Running pass: CoroSplitPass
201 ; CHECK-O-NEXT: Running pass: GlobalOptPass
202 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
203 ; CHECK-DEFAULT-NEXT: Running pass: EliminateAvailableExternallyPass
204 ; CHECK-LTO-NOT: Running pass: EliminateAvailableExternallyPass
205 ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
206 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
207 ; CHECK-O-NEXT: Running pass: Float2IntPass
208 ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass on foo
209 ; CHECK-MATRIX: Running pass: LowerMatrixIntrinsicsPass on f
210 ; CHECK-MATRIX-NEXT: Running pass: EarlyCSEPass on f
211 ; CHECK-EP-VECTORIZER-START-NEXT: Running pass: NoOpFunctionPass
212 ; CHECK-EXT: Running pass: {{.*}}::Bye on foo
213 ; CHECK-NOEXT:  {{^}}
214 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
215 ; CHECK-O-NEXT: Running pass: LCSSAPass
216 ; CHECK-O-NEXT: Running pass: LoopRotatePass
217 ; CHECK-O-NEXT: Running pass: LoopDistributePass
218 ; CHECK-O-NEXT: Running pass: InjectTLIMappings
219 ; CHECK-O-NEXT: Running pass: LoopVectorizePass
220 ; CHECK-O-NEXT: Running analysis: BlockFrequencyAnalysis
221 ; CHECK-O-NEXT: Running analysis: BranchProbabilityAnalysis
222 ; CHECK-O-NEXT: Running pass: LoopLoadEliminationPass
223 ; CHECK-O-NEXT: Running analysis: LoopAccessAnalysis
224 ; CHECK-O-NEXT: Running pass: InstCombinePass
225 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
226 ; CHECK-O2-NEXT: Running pass: SLPVectorizerPass
227 ; CHECK-O3-NEXT: Running pass: SLPVectorizerPass
228 ; CHECK-Os-NEXT: Running pass: SLPVectorizerPass
229 ; CHECK-O-NEXT: Running pass: VectorCombinePass
230 ; CHECK-O-NEXT: Running pass: InstCombinePass
231 ; CHECK-O-NEXT: Running pass: LoopUnrollPass
232 ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass
233 ; CHECK-O-NEXT: Running pass: InstCombinePass
234 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
235 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
236 ; CHECK-O-NEXT: Running pass: LCSSAPass
237 ; CHECK-O-NEXT: Running pass: LICMPass
238 ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass
239 ; CHECK-O-NEXT: Running pass: LoopSinkPass
240 ; CHECK-O-NEXT: Running pass: InstSimplifyPass
241 ; CHECK-O-NEXT: Running pass: DivRemPairsPass
242 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
243 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
244 ; CHECK-EP-OPTIMIZER-LAST: Running pass: NoOpFunctionPass
245 ; CHECK-O-NEXT: Running pass: CGProfilePass
246 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
247 ; CHECK-O-NEXT: Running pass: ConstantMergePass
248 ; CHECK-DEFAULT-NEXT: Running pass: RelLookupTableConverterPass
249 ; CHECK-LTO-NOT: Running pass: RelLookupTableConverterPass
250 ; CHECK-DEFAULT-NEXT: Running analysis: TargetIRAnalysis
251 ; CHECK-LTO-NOT: Running analysis: TargetIRAnalysis
252 ; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
253 ; CHECK-LTO-NEXT: Running pass: CanonicalizeAliasesPass
254 ; CHECK-LTO-NEXT: Running pass: NameAnonGlobalPass
255 ; CHECK-O-NEXT: Running pass: PrintModulePass
257 ; Make sure we get the IR back out without changes when we print the module.
258 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
259 ; CHECK-O-NEXT: entry:
260 ; CHECK-O-NEXT:   br label %loop
261 ; CHECK-O:      loop:
262 ; CHECK-O-NEXT:   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
263 ; CHECK-O-NEXT:   %iv.next = add i32 %iv, 1
264 ; CHECK-O-NEXT:   tail call void @bar()
265 ; CHECK-O-NEXT:   %cmp = icmp eq i32 %iv, %n
266 ; CHECK-O-NEXT:   br i1 %cmp, label %exit, label %loop
267 ; CHECK-O:      exit:
268 ; CHECK-O-NEXT:   ret void
269 ; CHECK-O-NEXT: }
271 declare void @bar() local_unnamed_addr
273 define void @foo(i32 %n) local_unnamed_addr {
274 entry:
275   br label %loop
276 loop:
277   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
278   %iv.next = add i32 %iv, 1
279   tail call void @bar()
280   %cmp = icmp eq i32 %iv, %n
281   br i1 %cmp, label %exit, label %loop
282 exit:
283   ret void