1 ; RUN: opt -passes="loop(indvars,loop-deletion,loop-unroll-full)" -print-pass-numbers -S -o /dev/null %s 2>&1 | FileCheck %s --check-prefix=NUMBER
2 ; RUN: opt -passes="loop(indvars,loop-deletion,loop-unroll-full)" -print-module-scope -print-at-pass-number=3 -S -o /dev/null %s 2>&1 | FileCheck %s --check-prefix=AT
3 ; RUN: opt -passes="loop(indvars,loop-deletion,loop-unroll-full)" -print-module-scope -print-at-pass-number=4 -S -o /dev/null %s 2>&1 | FileCheck %s --check-prefix=AT-INVALIDATE
5 define i32 @bar(i32 %arg) {
6 ; AT: *** IR Dump At 3-IndVarSimplifyPass on bb1 ***
7 ; AT: define i32 @bar(i32 %arg) {
9 ; AT-INVALIDATE: *** IR Dump At 4-LoopDeletionPass on bb1 (invalidated) ***
10 ; AT-INVALIDATE: define i32 @bar(i32 %arg) {
15 bb1: ; preds = %bb1, %bb
16 %phi = phi i32 [ 0, %bb ], [ %add, %bb1 ]
17 %phi2 = phi i32 [ 0, %bb ], [ %add3, %bb1 ]
18 %add = add i32 %phi, 1
19 %add3 = add i32 %phi2, %add
20 %icmp = icmp slt i32 %phi, %arg
21 br i1 %icmp, label %bb1, label %bb4
27 ; NUMBER: Running pass 1 LoopSimplifyPass on bar
28 ; NUMBER-NEXT: Running pass 2 LCSSAPass on bar
29 ; NUMBER-NEXT: Running pass 3 IndVarSimplifyPass on bb1
30 ; NUMBER-NEXT: Running pass 4 LoopDeletionPass on bb1
31 ; NUMBER-NOT: Running pass