• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; FIXME: This test should use CHECK-NEXT to keep up-to-date.
2; REQUIRES: x86-registered-target
3
4; Validate ThinLTO post link pipeline at O2 and O3
5
6; RUN: opt -thinlto-bc -o %t.o %s
7
8; RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \
9; RUN:   -o %t2.index \
10; RUN:   -r=%t.o,main,px
11
12; RUN: %clang -target x86_64-grtev4-linux-gnu \
13; RUN:   -O2 -fexperimental-new-pass-manager -Xclang -fdebug-pass-manager \
14; RUN:   -c -fthinlto-index=%t.o.thinlto.bc \
15; RUN:   -o %t.native.o -x ir %t.o 2>&1 | FileCheck -check-prefixes=CHECK-O,CHECK-O2 %s --dump-input=fail
16
17; RUN: %clang -target x86_64-grtev4-linux-gnu \
18; RUN:   -O3 -fexperimental-new-pass-manager -Xclang -fdebug-pass-manager \
19; RUN:   -c -fthinlto-index=%t.o.thinlto.bc \
20; RUN:   -o %t.native.o -x ir %t.o 2>&1 | FileCheck -check-prefixes=CHECK-O,CHECK-O3 %s --dump-input=fail
21
22; CHECK-O: Starting {{.*}}Module pass manager run.
23; CHECK-O: Running pass: WholeProgramDevirtPass
24; CHECK-O: Running analysis: InnerAnalysisManagerProxy
25; CHECK-O: Running pass: LowerTypeTestsPass
26; CHECK-O: Invalidating analysis: InnerAnalysisManagerProxy
27; CHECK-O: Running pass: ForceFunctionAttrsPass
28; CHECK-O: Running pass: PGOIndirectCallPromotion
29; CHECK-O: Running analysis: ProfileSummaryAnalysis
30; CHECK-O: Running analysis: InnerAnalysisManagerProxy
31; CHECK-O: Running analysis: OptimizationRemarkEmitterAnalysis on main
32; CHECK-O: Running pass: InferFunctionAttrsPass
33; CHECK-O: Starting {{.*}}Function pass manager run.
34; CHECK-O: Running pass: SimplifyCFGPass on main
35; CHECK-O: Running analysis: TargetIRAnalysis on main
36; CHECK-O: Running analysis: AssumptionAnalysis on main
37; CHECK-O: Running pass: SROA on main
38; CHECK-O: Running analysis: DominatorTreeAnalysis on main
39; CHECK-O: Running pass: EarlyCSEPass on main
40; CHECK-O: Running analysis: TargetLibraryAnalysis on main
41; CHECK-O: Running pass: LowerExpectIntrinsicPass on main
42; CHECK-O3: Running pass: CallSiteSplittingPass on main
43; CHECK-O: Finished {{.*}}Function pass manager run.
44; CHECK-O: Running pass: LowerTypeTestsPass
45; CHECK-O: Running pass: IPSCCPPass
46; CHECK-O: Running pass: CalledValuePropagationPass
47; CHECK-O: Running pass: GlobalOptPass
48; CHECK-O: Invalidating analysis: InnerAnalysisManagerProxy
49; CHECK-O: Running analysis: InnerAnalysisManagerProxy
50; CHECK-O: Running pass: PromotePass
51; CHECK-O: Running analysis: DominatorTreeAnalysis on main
52; CHECK-O: Running analysis: AssumptionAnalysis on main
53; CHECK-O: Running pass: DeadArgumentEliminationPass
54; CHECK-O: Starting {{.*}}Function pass manager run.
55; CHECK-O: Running pass: InstCombinePass on main
56; CHECK-O: Running analysis: TargetLibraryAnalysis on main
57; CHECK-O: Running analysis: OptimizationRemarkEmitterAnalysis on main
58; CHECK-O: Running analysis: TargetIRAnalysis on main
59; CHECK-O: Running analysis: AAManager on main
60; CHECK-O: Running analysis: BasicAA on main
61; CHECK-O: Running analysis: ScopedNoAliasAA on main
62; CHECK-O: Running analysis: TypeBasedAA on main
63; CHECK-O: Running analysis: OuterAnalysisManagerProxy
64; CHECK-O: Running pass: SimplifyCFGPass on main
65; CHECK-O: Finished {{.*}}Function pass manager run.
66; CHECK-O: Running pass: ModuleInlinerWrapperPass
67; CHECK-O: Running analysis: InlineAdvisorAnalysis
68; CHECK-O: Running analysis: InnerAnalysisManagerProxy
69; CHECK-O: Running analysis: LazyCallGraphAnalysis
70; CHECK-O: Running analysis: FunctionAnalysisManagerCGSCCProxy on (main)
71; CHECK-O: Running analysis: OuterAnalysisManagerProxy
72; CHECK-O: Running pass: InlinerPass on (main)
73; CHECK-O: Finished {{.*}}Module pass manager run
74; CHECK-O: Running pass: ModuleInlinerWrapperPass
75; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
76; CHECK-O: Running analysis: GlobalsAA
77; CHECK-O: Running analysis: CallGraphAnalysis
78; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
79; CHECK-O: Starting CGSCC pass manager run.
80; CHECK-O: Running pass: InlinerPass on (main)
81; CHECK-O: Running pass: PostOrderFunctionAttrsPass on (main)
82; CHECK-O: Clearing all analysis results for: main
83; CHECK-O3: Running pass: ArgumentPromotionPass on (main)
84; CHECK-O3: Running analysis: TargetIRAnalysis on main
85; CHECK-O: Starting {{.*}}Function pass manager run.
86; CHECK-O: Running pass: SROA on main
87; These next two can appear in any order since they are accessed as parameters
88; on the same call to SROA::runImpl
89; CHECK-O-DAG: Running analysis: DominatorTreeAnalysis on main
90; CHECK-O-DAG: Running analysis: AssumptionAnalysis on main
91; CHECK-O: Running pass: EarlyCSEPass on main
92; CHECK-O: Running analysis: TargetLibraryAnalysis on main
93; CHECK-O2: Running analysis: TargetIRAnalysis on main
94; CHECK-O: Running analysis: MemorySSAAnalysis on main
95; CHECK-O: Running analysis: AAManager on main
96; CHECK-O: Running analysis: BasicAA on main
97; CHECK-O: Running analysis: ScopedNoAliasAA on main
98; CHECK-O: Running analysis: TypeBasedAA on main
99; CHECK-O: Running analysis: OuterAnalysisManagerProxy
100; CHECK-O: Running pass: SpeculativeExecutionPass on main
101; CHECK-O: Running pass: JumpThreadingPass on main
102; CHECK-O: Running analysis: LazyValueAnalysis on main
103; CHECK-O: Running pass: CorrelatedValuePropagationPass on main
104; CHECK-O: Invalidating analysis: LazyValueAnalysis on main
105; CHECK-O: Running pass: SimplifyCFGPass on main
106; CHECK-O3: Running pass: AggressiveInstCombinePass on main
107; CHECK-O: Running pass: InstCombinePass on main
108; CHECK-O: Running analysis: OptimizationRemarkEmitterAnalysis on main
109; CHECK-O: Running pass: LibCallsShrinkWrapPass on main
110; CHECK-O: Running pass: TailCallElimPass on main
111; CHECK-O: Running pass: SimplifyCFGPass on main
112; CHECK-O: Running pass: ReassociatePass on main
113; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
114; CHECK-O: Starting {{.*}}Function pass manager run.
115; CHECK-O: Running pass: LoopSimplifyPass on main
116; CHECK-O: Running analysis: LoopAnalysis on main
117; CHECK-O: Running pass: LCSSAPass on main
118; CHECK-O: Finished {{.*}}Function pass manager run.
119; CHECK-O: Running pass: SimplifyCFGPass on main
120; CHECK-O: Running pass: InstCombinePass on main
121; CHECK-O: Starting {{.*}}Function pass manager run.
122; CHECK-O: Running pass: LoopSimplifyPass on main
123; CHECK-O: Running pass: LCSSAPass on main
124; CHECK-O: Finished {{.*}}Function pass manager run.
125; CHECK-O: Running pass: SROA on main
126; CHECK-O: Running pass: MergedLoadStoreMotionPass on main
127; CHECK-O: Running pass: GVN on main
128; CHECK-O: Running analysis: MemoryDependenceAnalysis on main
129; CHECK-O: Running analysis: PhiValuesAnalysis on main
130; CHECK-O: Running pass: MemCpyOptPass on main
131; CHECK-O: Running pass: SCCPPass on main
132; CHECK-O: Running pass: BDCEPass on main
133; CHECK-O: Running analysis: DemandedBitsAnalysis on main
134; CHECK-O: Running pass: InstCombinePass on main
135; CHECK-O: Running pass: JumpThreadingPass on main
136; CHECK-O: Running pass: CorrelatedValuePropagationPass on main
137; CHECK-O: Running pass: ADCEPass on main
138; CHECK-O: Running analysis: PostDominatorTreeAnalysis on main
139; CHECK-O: Running pass: DSEPass on main
140; CHECK-O: Starting {{.*}}Function pass manager run.
141; CHECK-O: Running pass: LoopSimplifyPass on main
142; CHECK-O: Running pass: LCSSAPass on main
143; CHECK-O: Finished {{.*}}Function pass manager run.
144; CHECK-O: Running pass: SimplifyCFGPass on main
145; CHECK-O: Running pass: InstCombinePass on main
146; CHECK-O: Finished {{.*}}Function pass manager run.
147; CHECK-O: Finished CGSCC pass manager run.
148; CHECK-O: Invalidating analysis: DominatorTreeAnalysis on main
149; CHECK-O: Invalidating analysis: BasicAA on main
150; CHECK-O: Invalidating analysis: AAManager on main
151; CHECK-O: Invalidating analysis: MemorySSAAnalysis on main
152; CHECK-O: Invalidating analysis: LoopAnalysis on main
153; CHECK-O: Invalidating analysis: PhiValuesAnalysis on main
154; CHECK-O: Invalidating analysis: MemoryDependenceAnalysis on main
155; CHECK-O: Invalidating analysis: DemandedBitsAnalysis on main
156; CHECK-O: Invalidating analysis: PostDominatorTreeAnalysis on main
157; CHECK-O: Invalidating analysis: CallGraphAnalysis
158; CHECK-O: Running pass: GlobalOptPass
159; CHECK-O: Running pass: GlobalDCEPass
160; CHECK-O: Running pass: EliminateAvailableExternallyPass
161; CHECK-O: Running pass: ReversePostOrderFunctionAttrsPass
162; CHECK-O: Running analysis: CallGraphAnalysis
163; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
164; CHECK-O: Starting {{.*}}Function pass manager run.
165; CHECK-O: Running pass: Float2IntPass on main
166; CHECK-O: Running pass: LowerConstantIntrinsicsPass on main
167; CHECK-O: Starting {{.*}}Function pass manager run.
168; CHECK-O: Running pass: LoopSimplifyPass on main
169; CHECK-O: Running analysis: LoopAnalysis on main
170; CHECK-O: Running pass: LCSSAPass on main
171; CHECK-O: Finished {{.*}}Function pass manager run.
172; CHECK-O: Running analysis: MemorySSAAnalysis on main
173; CHECK-O: Running analysis: AAManager on main
174; CHECK-O: Running analysis: BasicAA on main
175; CHECK-O: Running analysis: ScalarEvolutionAnalysis on main
176; CHECK-O: Running analysis: InnerAnalysisManagerProxy
177; CHECK-O: Running pass: LoopRotatePass on Loop at depth 1 containing: %b
178; CHECK-O: Running pass: LoopDistributePass on main
179; CHECK-O: Running pass: InjectTLIMappings on main
180; CHECK-O: Running pass: LoopVectorizePass on main
181; CHECK-O: Running analysis: BlockFrequencyAnalysis on main
182; CHECK-O: Running analysis: BranchProbabilityAnalysis on main
183; CHECK-O: Running analysis: PostDominatorTreeAnalysis on main
184; CHECK-O: Running analysis: DemandedBitsAnalysis on main
185; CHECK-O: Running pass: LoopLoadEliminationPass on main
186; CHECK-O: Running analysis: LoopAccessAnalysis on Loop at depth 1 containing: %b
187; CHECK-O: Running pass: InstCombinePass on main
188; CHECK-O: Running pass: SimplifyCFGPass on main
189; CHECK-O: Running pass: SLPVectorizerPass on main
190; CHECK-O: Running pass: VectorCombinePass on main
191; CHECK-O: Running pass: InstCombinePass on main
192; CHECK-O: Running pass: LoopUnrollPass on main
193; CHECK-O: Running pass: WarnMissedTransformationsPass on main
194; CHECK-O: Running pass: InstCombinePass on main
195; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
196; CHECK-O: Starting {{.*}}Function pass manager run.
197; CHECK-O: Running pass: LoopSimplifyPass on main
198; CHECK-O: Running pass: LCSSAPass on main
199; CHECK-O: Finished {{.*}}Function pass manager run.
200; CHECK-O: Running pass: LICMPass on Loop at depth 1 containing: %b
201; CHECK-O: Running pass: AlignmentFromAssumptionsPass on main
202; CHECK-O: Running pass: LoopSinkPass on main
203; CHECK-O: Running pass: InstSimplifyPass on main
204; CHECK-O: Running pass: DivRemPairsPass on main
205; CHECK-O: Running pass: SimplifyCFGPass on main
206; CHECK-O: Running pass: SpeculateAroundPHIsPass on main
207; CHECK-O: Finished {{.*}}Function pass manager run.
208; CHECK-O: Running pass: CGProfilePass
209; CHECK-O: Running pass: GlobalDCEPass
210; CHECK-O: Running pass: ConstantMergePass
211; CHECK-O: Finished {{.*}}Module pass manager run.
212
213target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
214target triple = "x86_64-grtev4-linux-gnu"
215
216define i32 @main() {
217  br label %b
218b:
219  br label %b
220  ret i32 0
221}
222