1 ; RUN: opt < %s -o /dev/null -enable-new-pm=0 -block-freq -opt-remark-emitter -memoryssa -inject-tli-mappings -pgo-memop-opt -verify-loop-info -debug-pass=Details 2>&1 | FileCheck %s
5 ; This is a heavily reduced reproducer for the problem found in
6 ; https://bugs.llvm.org/show_bug.cgi?id=49950 when doing fuzzy
7 ; testing (including non-standard pipelines).
9 ; The problem manifested as having a pass structure like this
10 ; when it failed (as given by using -debug-pass=Details):
12 ; Target Library Information
13 ; Target Transform Information
14 ; Profile summary info
15 ; Assumption Cache Tracker
17 ; FunctionPass Manager
18 ; Dominator Tree Construction
19 ; Natural Loop Information
20 ; Post-Dominator Tree Construction
21 ; Branch Probability Analysis
22 ; Block Frequency Analysis
23 ; -- Branch Probability Analysis
24 ; Lazy Branch Probability Analysis
25 ; Lazy Block Frequency Analysis
26 ; Optimization Remark Emitter
27 ; Basic Alias Analysis (stateless AA impl)
28 ; Function Alias Analysis Results
30 ; -- Dominator Tree Construction
31 ; -- Function Alias Analysis Results
32 ; -- Basic Alias Analysis (stateless AA impl)
35 ; -- Inject TLI Mappings
37 ; -- Block Frequency Analysis
38 ; -- Post-Dominator Tree Construction
39 ; -- Optimization Remark Emitter
40 ; -- Lazy Branch Probability Analysis
41 ; -- Natural Loop Information
42 ; -- Lazy Block Frequency Analysis
46 ; -- Target Library Information
47 ; -- Profile summary info
48 ; -- Assumption Cache Tracker
52 ; One might notice that "Dominator Tree Construction" is dropped after
53 ; "Memory SSA", while for example "Natural Loop Information" stick around
54 ; a bit longer. This despite "Dominator Tree Construction" being transitively
55 ; required by "Natural Loop Information".
56 ; The end result was that we got crashes when doing verification of loop
57 ; info after "Inject TLI Mappings" (since the dominator tree had been
60 ; Verify that both domintator tree and loop info are kept until after
63 ; CHECK: Dominator Tree Construction
64 ; CHECK-NOT: -- Dominator Tree Construction
66 ; CHECK-NOT: -- Dominator Tree Construction
67 ; CHECK: Inject TLI Mappings
68 ; CHECK-NOT: -- Dominator Tree Construction
70 ; CHECK-DAG: -- Dominator Tree Construction
71 ; CHECK-DAG: -- Natural Loop Information
72 ; CHECK-DAG: -- PGOMemOPSize
73 ; CHECK: Bitcode Writer