1 ; RUN: opt < %s -debug-pass=Structure -indvars -gvn -indvars 2>&1 -S | FileCheck --check-prefix=CHECK --check-prefix=IR %s
2 ; RUN: opt < %s -debug-pass-manager -passes='require<domtree>,loop(simplify-cfg),gvn,loop(indvars)' 2>&1 -S | FileCheck --check-prefix=NEW-PM --check-prefix=IR %s
4 ; Check CFG-only analysis are preserved by SCCP by running it between 2
7 ; CHECK: Dominator Tree Construction
8 ; CHECK: Natural Loop Information
9 ; CHECK: Canonicalize natural loops
10 ; CHECK: LCSSA Verifier
11 ; CHECK: Loop-Closed SSA Form Pass
12 ; CHECK: Global Value Numbering
13 ; CHECK-NOT: Dominator Tree Construction
14 ; CHECK-NOT: Natural Loop Information
15 ; CHECK-NOT: Canonicalize natural loops
17 ; NEW-PM-DAG: Running analysis: LoopAnalysis on test
18 ; NEW-PM-DAG: Running analysis: DominatorTreeAnalysis on test
19 ; NEW-PM: Running pass: GVN on test
20 ; NEW-PM-NOT: Running analysis: LoopAnalysis on test
21 ; NEW-PM-NOT: Running analysis: DominatorTreeAnalysis on test
24 declare void @dostuff()
27 ; IR-LABEL: define i32 @test()
29 ; IR: br i1 false, label %then, label %latch
31 ; IR-NEXT: call void @dostuff()
32 ; IR-NEXT: br label %latch
38 %iv = phi i32 [ %res, %entry ], [ 0, %latch ]
39 %ic = icmp eq i32 %res, 99
40 br i1 %ic, label %then, label %latch
52 br i1 %ec, label %exit, label %header