1; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP-AFTER
2; STOP-AFTER: -loop-reduce
3; STOP-AFTER: Dominator Tree Construction
4; STOP-AFTER: Loop Strength Reduction
5; STOP-AFTER-NEXT: MIR Printing Pass
6
7; RUN: llc < %s -debug-pass=Structure -stop-before=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP-BEFORE
8; STOP-BEFORE-NOT: -loop-reduce
9; STOP-BEFORE: Dominator Tree Construction
10; STOP-BEFORE-NOT: Loop Strength Reduction
11
12; RUN: llc < %s -debug-pass=Structure -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START-AFTER
13; START-AFTER: -machine-branch-prob -pre-isel-intrinsic-lowering
14; START-AFTER: FunctionPass Manager
15; START-AFTER-NEXT: Lower Garbage Collection Instructions
16
17; RUN: llc < %s -debug-pass=Structure -start-before=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START-BEFORE
18; START-BEFORE: -machine-branch-prob -pre-isel-intrinsic-lowering
19; START-BEFORE: FunctionPass Manager
20; START-BEFORE: Loop Strength Reduction
21; START-BEFORE-NEXT: Lower Garbage Collection Instructions
22
23; RUN: not llc < %s -start-before=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-START-BEFORE
24; RUN: not llc < %s -stop-before=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-STOP-BEFORE
25; RUN: not llc < %s -start-after=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-START-AFTER
26; RUN: not llc < %s -stop-after=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-STOP-AFTER
27; NONEXISTENT-START-BEFORE: start-before pass is not registered.
28; NONEXISTENT-STOP-BEFORE: stop-before pass is not registered.
29; NONEXISTENT-START-AFTER: start-after pass is not registered.
30; NONEXISTENT-STOP-AFTER: stop-after pass is not registered.
31
32; RUN: not llc < %s -start-before=loop-reduce -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=DOUBLE-START
33; RUN: not llc < %s -stop-before=loop-reduce -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=DOUBLE-STOP
34; DOUBLE-START: -start-before and -start-after specified!
35; DOUBLE-STOP: -stop-before and -stop-after specified!
36