Jan Wen Voung | 6dc3076 | 2013-03-12 16:27:52 +0000 | [diff] [blame] | 1 | ; REQUIRES: asserts |
Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 2 | ; RUN: opt -regions -analyze < %s | FileCheck %s |
Tobias Grosser | 670a5d8 | 2017-07-29 09:58:43 +0000 | [diff] [blame] | 3 | ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s |
Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 4 | |
Chandler Carruth | 5da5343 | 2012-07-02 18:37:59 +0000 | [diff] [blame] | 5 | ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s |
| 6 | ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s |
Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 7 | |
Hongbin Zheng | bc53977 | 2016-02-25 17:54:25 +0000 | [diff] [blame] | 8 | ; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s |
| 9 | |
Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 10 | define internal fastcc zeroext i8 @handle_compress() nounwind { |
| 11 | entry: |
| 12 | br label %outer |
| 13 | |
| 14 | outer: |
| 15 | br label %body |
| 16 | |
| 17 | body: |
| 18 | br i1 1, label %exit172, label %end |
| 19 | |
| 20 | exit172: |
| 21 | br i1 1, label %end, label %outer |
| 22 | |
| 23 | end: |
| 24 | ret i8 1 |
| 25 | } |
| 26 | ; CHECK-NOT: => |
| 27 | ; CHECK: [0] entry => <Function Return> |
| 28 | ; CHECK-NEXT: [1] outer => end |
| 29 | |
| 30 | ; STAT: 2 region - The # of regions |
| 31 | |
| 32 | ; BBIT: entry, outer, body, exit172, end, |
| 33 | ; BBIT: outer, body, exit172, |
| 34 | |
| 35 | ; RNIT: entry, outer => end, end, |
| 36 | ; RNIT: outer, body, exit172, |