1; Note: -verify-machineinstrs is used in order to make this test compatible with EXPENSIVE_CHECKS.
2; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -verify-machineinstrs -o /dev/null 2>&1 \
3; RUN:   | FileCheck %s -check-prefix=STOP-AFTER
4; STOP-AFTER: -loop-reduce
5; STOP-AFTER: Dominator Tree Construction
6; STOP-AFTER: Loop Strength Reduction
7; STOP-AFTER-NEXT: Verify generated machine code
8; STOP-AFTER-NEXT: MIR Printing Pass
9
10; RUN: llc < %s -debug-pass=Structure -stop-before=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP-BEFORE
11; STOP-BEFORE-NOT: -loop-reduce
12; STOP-BEFORE: Dominator Tree Construction
13; STOP-BEFORE-NOT: Loop Strength Reduction
14
15; RUN: llc < %s -debug-pass=Structure -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START-AFTER
16; START-AFTER: -aa -mergeicmps
17; START-AFTER: FunctionPass Manager
18; START-AFTER-NEXT: Dominator Tree Construction
19
20; RUN: llc < %s -debug-pass=Structure -start-before=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START-BEFORE
21; START-BEFORE: -machine-branch-prob -regalloc-evict -domtree
22; START-BEFORE: FunctionPass Manager
23; START-BEFORE: Loop Strength Reduction
24; START-BEFORE-NEXT: Basic Alias Analysis (stateless AA impl)
25
26; RUN: not --crash llc < %s -start-before=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-START-BEFORE
27; RUN: not --crash llc < %s -stop-before=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-STOP-BEFORE
28; RUN: not --crash llc < %s -start-after=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-START-AFTER
29; RUN: not --crash llc < %s -stop-after=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-STOP-AFTER
30; NONEXISTENT-START-BEFORE: "nonexistent" pass is not registered.
31; NONEXISTENT-STOP-BEFORE: "nonexistent" pass is not registered.
32; NONEXISTENT-START-AFTER: "nonexistent" pass is not registered.
33; NONEXISTENT-STOP-AFTER: "nonexistent" pass is not registered.
34
35; RUN: not --crash llc < %s -start-before=loop-reduce -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=DOUBLE-START
36; RUN: not --crash llc < %s -stop-before=loop-reduce -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=DOUBLE-STOP
37; DOUBLE-START: start-before and start-after specified!
38; DOUBLE-STOP: stop-before and stop-after specified!
39