Tobias Grosser | f96b006 | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 1 | ; RUN: opt -regions -analyze < %s | FileCheck %s |
Chandler Carruth | 49589f0 | 2012-07-02 18:37:59 +0000 | [diff] [blame] | 2 | ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s |
Tobias Grosser | f96b006 | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 3 | |
Chandler Carruth | 49589f0 | 2012-07-02 18:37:59 +0000 | [diff] [blame] | 4 | ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s |
| 5 | ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s |
Tobias Grosser | f96b006 | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 6 | |
| 7 | define internal fastcc zeroext i8 @handle_compress() nounwind { |
| 8 | entry: |
| 9 | br label %outer |
| 10 | |
| 11 | outer: |
| 12 | br label %body |
| 13 | |
| 14 | body: |
| 15 | br i1 1, label %exit172, label %end |
| 16 | |
| 17 | exit172: |
| 18 | br i1 1, label %end, label %outer |
| 19 | |
| 20 | end: |
| 21 | ret i8 1 |
| 22 | } |
| 23 | ; CHECK-NOT: => |
| 24 | ; CHECK: [0] entry => <Function Return> |
| 25 | ; CHECK-NEXT: [1] outer => end |
| 26 | |
| 27 | ; STAT: 2 region - The # of regions |
| 28 | |
| 29 | ; BBIT: entry, outer, body, exit172, end, |
| 30 | ; BBIT: outer, body, exit172, |
| 31 | |
| 32 | ; RNIT: entry, outer => end, end, |
| 33 | ; RNIT: outer, body, exit172, |