[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / Other / new-pm-thinlto-prelink-defaults.ll
blob6486639e07b49c010e3c8ea0a39bc4df38169657
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-analysis-invalidation=0 -eagerly-invalidate-analyses=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-O-NODIS
14 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
15 ; RUN:     -unified-lto -passes='lto-pre-link<O1>' -S %s 2>&1 \
16 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-O-NODIS
17 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
18 ; RUN:     -passes='thinlto-pre-link<O2>' -S  %s 2>&1 \
19 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O-NODIS
20 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
21 ; RUN:     -unified-lto -passes='lto-pre-link<O2>' -S  %s 2>&1 \
22 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O-NODIS
23 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
24 ; RUN:     -passes='thinlto-pre-link<O3>' -S -passes-ep-pipeline-start='no-op-module' %s 2>&1 \
25 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-EP-PIPELINE-START
26 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
27 ; RUN:     -unified-lto -passes='lto-pre-link<O3>' -S -passes-ep-pipeline-start='no-op-module' %s 2>&1 \
28 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-EP-PIPELINE-START
29 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
30 ; RUN:     -passes='thinlto-pre-link<O3>' -S -passes-ep-optimizer-early='no-op-module' %s 2>&1 \
31 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-EP-OPT-EARLY
32 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
33 ; RUN:     -unified-lto -passes='lto-pre-link<O3>' -S -passes-ep-optimizer-early='no-op-module' %s 2>&1 \
34 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-EP-OPT-EARLY
35 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
36 ; RUN:     -passes='thinlto-pre-link<O3>' -S -passes-ep-optimizer-last='no-op-module' %s 2>&1 \
37 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-EP-OPT-LAST
38 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
39 ; RUN:     -unified-lto -passes='lto-pre-link<O3>' -S -passes-ep-optimizer-last='no-op-module' %s 2>&1 \
40 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-EP-OPT-LAST
41 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
42 ; RUN:     -passes='thinlto-pre-link<Os>' -S %s 2>&1 \
43 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O23SZ,CHECK-O-NODIS
44 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
45 ; RUN:     -unified-lto -passes='lto-pre-link<Os>' -S %s 2>&1 \
46 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O23SZ,CHECK-O-NODIS
47 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
48 ; RUN:     -passes='thinlto-pre-link<Oz>' -S %s 2>&1 \
49 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O23SZ,CHECK-O-NODIS
50 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
51 ; RUN:     -unified-lto -passes='lto-pre-link<Oz>' -S %s 2>&1 \
52 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O23SZ,CHECK-O-NODIS
53 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager -debug-info-for-profiling \
54 ; RUN:     -passes='thinlto-pre-link<O2>' -S  %s 2>&1 \
55 ; RUN:     | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-O23SZ
56 ; RUN: opt -disable-verify -verify-analysis-invalidation=0 -eagerly-invalidate-analyses=0 -debug-pass-manager -debug-info-for-profiling \
57 ; RUN:     -unified-lto -passes='lto-pre-link<O2>' -S  %s 2>&1 \
58 ; RUN:     | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-O23SZ
61 ; Suppress FileCheck --allow-unused-prefixes=false diagnostics.
62 ; CHECK-NOEXT: {{^}}
64 ; CHECK-O: Running pass: Annotation2Metadata
65 ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
66 ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass
67 ; CHECK-DIS-NEXT: Running analysis: InnerAnalysisManagerProxy
68 ; CHECK-DIS-NEXT: Running pass: AddDiscriminatorsPass
69 ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
70 ; CHECK-O-NODIS-NEXT: Running analysis: InnerAnalysisManagerProxy
71 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
72 ; CHECK-O-NEXT: Running pass: CoroEarlyPass
73 ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass
74 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
75 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
76 ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis
77 ; CHECK-O-NEXT: Running pass: SROAPass
78 ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis
79 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
80 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
81 ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass
82 ; CHECK-O-NEXT: Running pass: OpenMPOptPass
83 ; CHECK-O-NEXT: Running pass: IPSCCPPass
84 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
85 ; CHECK-O-NEXT: Running pass: GlobalOptPass
86 ; CHECK-O-NEXT: Running pass: PromotePass
87 ; CHECK-O-NEXT: Running pass: InstCombinePass
88 ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
89 ; CHECK-O-NEXT: Running analysis: AAManager
90 ; CHECK-O-NEXT: Running analysis: BasicAA
91 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
92 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
93 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
94 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
95 ; CHECK-O-NEXT: Running pass: AlwaysInlinerPass
96 ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis
97 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
98 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
99 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
100 ; CHECK-O-NEXT: Running analysis: GlobalsAA
101 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
102 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
103 ; CHECK-O-NEXT: Invalidating analysis: AAManager
104 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
105 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
106 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
107 ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
108 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
109 ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass
110 ; CHECK-O-NEXT: Running pass: InlinerPass
111 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
112 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
113 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
114 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
115 ; CHECK-O-NEXT: Running pass: SROAPass
116 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
117 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
118 ; CHECK-O-NEXT: Running analysis: AAManager
119 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
120 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
121 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
122 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
123 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
124 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
125 ; CHECK-O-NEXT: Running pass: InstCombinePass
126 ; CHECK-O23SZ-NEXT: Running pass: AggressiveInstCombinePass
127 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
128 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
129 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
130 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
131 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
132 ; CHECK-O-NEXT: Running pass: ReassociatePass
133 ; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
134 ; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis
135 ; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
136 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
137 ; CHECK-O1-NEXT: Running analysis: LoopAnalysis
138 ; CHECK-O-NEXT: Running pass: LCSSAPass
139 ; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
140 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
141 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
142 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
143 ; CHECK-O-NEXT: Running pass: LICM
144 ; CHECK-O-NEXT: Running pass: LoopRotatePass
145 ; CHECK-O-NEXT: Running pass: LICM
146 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
147 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
148 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
149 ; CHECK-O-NEXT: Running pass: InstCombinePass
150 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
151 ; CHECK-O-NEXT: Running pass: LCSSAPass
152 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
153 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
154 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
155 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
156 ; CHECK-O-NEXT: Running pass: SROAPass on foo
157 ; CHECK-O23SZ-NEXT: Running pass: VectorCombinePass
158 ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass
159 ; CHECK-O23SZ-NEXT: Running pass: GVNPass
160 ; CHECK-O23SZ-NEXT: Running analysis: MemoryDependenceAnalysis
161 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
162 ; CHECK-O1-NEXT: Running analysis: PostDominatorTreeAnalysis
163 ; CHECK-O-NEXT: Running pass: SCCPPass
164 ; CHECK-O-NEXT: Running pass: BDCEPass
165 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
166 ; CHECK-O-NEXT: Running pass: InstCombinePass
167 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
168 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
169 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
170 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
171 ; CHECK-O1-NEXT: Running pass: CoroElidePass
172 ; CHECK-O-NEXT: Running pass: ADCEPass
173 ; CHECK-O23SZ-NEXT: Running analysis: PostDominatorTreeAnalysis
174 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
175 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
176 ; CHECK-O23SZ-NEXT: Running pass: MoveAutoInitPass
177 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
178 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
179 ; CHECK-O23SZ-NEXT: Running pass: LICMPass on loop
180 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
181 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
182 ; CHECK-O-NEXT: Running pass: InstCombinePass
183 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
184 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
185 ; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
186 ; CHECK-O-NEXT: Running pass: CoroSplitPass
187 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
188 ; CHECK-O-NEXT: Invalidating analysis: ShouldNotRunFunctionPassesAnalysis
189 ; CHECK-O-NEXT: Invalidating analysis: InlineAdvisorAnalysis
190 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
191 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
192 ; CHECK-O-NEXT: Running pass: GlobalOptPass
193 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
194 ; CHECK-EXT: Running pass: {{.*}}::Bye
195 ; CHECK-EP-OPT-EARLY-NEXT: Running pass: NoOpModulePass
196 ; CHECK-EP-OPT-LAST-NEXT: Running pass: NoOpModulePass
197 ; CHECK-O-NEXT:          Running pass: AnnotationRemarksPass on foo
198 ; CHECK-O-NEXT: Running pass: CanonicalizeAliasesPass
199 ; CHECK-O-NEXT: Running pass: NameAnonGlobalPass
200 ; CHECK-O-NEXT: Running pass: PrintModulePass
202 ; Make sure we get the IR back out without changes when we print the module.
203 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
204 ; CHECK-O-NEXT: entry:
205 ; CHECK-O-NEXT:   br label %loop
206 ; CHECK-O:      loop:
207 ; CHECK-O-NEXT:   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
208 ; CHECK-O-NEXT:   %iv.next = add i32 %iv, 1
209 ; CHECK-O-NEXT:   tail call void @bar()
210 ; CHECK-O-NEXT:   %cmp = icmp eq i32 %iv, %n
211 ; CHECK-O-NEXT:   br i1 %cmp, label %exit, label %loop
212 ; CHECK-O:      exit:
213 ; CHECK-O-NEXT:   ret void
214 ; CHECK-O-NEXT: }
217 declare void @bar() local_unnamed_addr
219 define void @foo(i32 %n) local_unnamed_addr {
220 entry:
221   br label %loop
222 loop:
223   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
224   %iv.next = add i32 %iv, 1
225   tail call void @bar()
226   %cmp = icmp eq i32 %iv, %n
227   br i1 %cmp, label %exit, label %loop
228 exit:
229   ret void