| 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 |
| Chandler Carruth | 5da5343 | 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 | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 6 | |
| Hongbin Zheng | bc53977 | 2016-02-25 17:54:25 +0000 | [diff] [blame] | 7 | ; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s |
| 8 | |
| Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 9 | define internal fastcc void @compress() nounwind { |
| 10 | end33: |
| 11 | br i1 1, label %end124, label %lor.lhs.false95 |
| 12 | |
| 13 | lor.lhs.false95: |
| 14 | br i1 1, label %then107, label %end172 |
| 15 | |
| 16 | then107: |
| 17 | br i1 1, label %end124, label %then113 |
| 18 | |
| 19 | then113: |
| 20 | br label %end124 |
| 21 | |
| 22 | end124: |
| 23 | br label %exit |
| 24 | |
| 25 | end172: |
| 26 | br label %exit |
| 27 | |
| 28 | |
| 29 | exit: |
| 30 | unreachable |
| 31 | |
| 32 | |
| 33 | } |
| 34 | ; CHECK-NOT: => |
| 35 | ; CHECK: [0] end33 => <Function Return> |
| 36 | ; CHECK-NEXT: [1] end33 => exit |
| 37 | ; CHECK-NEXT: [2] then107 => end124 |
| 38 | |
| 39 | ; STAT: 3 region - The # of regions |
| 40 | |
| 41 | ; BBIT: end33, end124, exit, lor.lhs.false95, then107, then113, end172, |
| 42 | ; BBIT: end33, end124, lor.lhs.false95, then107, then113, end172, |
| 43 | ; BBIT: then107, then113, |
| 44 | |
| 45 | ; RNIT: end33 => exit, exit, |
| 46 | ; RNIT: end33, end124, lor.lhs.false95, then107 => end124, end172, |
| 47 | ; RNIT: then107, then113, |