1 ; Basic test to check that DominatorTreeAnalysis is preserved by IPSCCP and
2 ; the following analysis can re-use it. The test contains two trivial functions
3 ; IPSCCP can simplify, so we can test the case where IPSCCP makes changes.
5 ; RUN: opt -disable-verify -debug-pass-manager \
6 ; RUN: -passes='function(require<domtree>,require<postdomtree>),ipsccp,function(require<domtree>,require<postdomtree>)' -S %s 2>&1 \
7 ; RUN: | FileCheck -check-prefixes='IR,NEW-PM' %s
9 ; RUN: opt -passes='function(require<postdomtree>),ipsccp,function(verify<domtree>)' -S %s | FileCheck -check-prefixes='IR' %s
11 ; NEW-PM: Starting llvm::Module pass manager run.
12 ; NEW-PM: Running analysis: DominatorTreeAnalysis on f1
13 ; NEW-PM: Running analysis: PostDominatorTreeAnalysis on f1
14 ; NEW-PM: Running analysis: DominatorTreeAnalysis on f2
15 ; NEW-PM: Running analysis: PostDominatorTreeAnalysis on f2
16 ; NEW-PM: Running pass: IPSCCPPass
17 ; NEW-PM-DAG: Running analysis: AssumptionAnalysis on f1
18 ; NEW-PM-DAG: Running analysis: AssumptionAnalysis on f2
19 ; NEW-PM-NEXT: Invalidating all non-preserved analyses for:
20 ; NEW-PM-NEXT: Invalidating all non-preserved analyses for: f1
21 ; NEW-PM-NEXT: Invalidating all non-preserved analyses for: f2
22 ; NEW-PM-NEXT: Running pass: ModuleToFunctionPassAdaptor
23 ; NEW-PM-NOT: Running analysis:
27 ; IR-NEXT: br label %bb2
33 ; IR: br label %bbtrue
36 define internal i32 @f1() readnone {
38 br i1 false, label %bb1, label %bb2
45 define i32 @f2(i32 %n) {
47 %cmp = icmp eq i32 %i, 10
48 br i1 %cmp, label %bbtrue, label %bbfalse