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 |
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 | |
| 7 | define void @normal_condition() nounwind { |
| 8 | 0: |
| 9 | br label %"1" |
| 10 | 1: |
| 11 | br i1 1, label %"2", label %"3" |
| 12 | 2: |
| 13 | br label %"5" |
| 14 | 5: |
| 15 | br i1 1, label %"11", label %"12" |
| 16 | 11: |
| 17 | br label %"6" |
| 18 | 12: |
| 19 | br label %"6" |
| 20 | 6: |
| 21 | br label %"2" |
| 22 | 3: |
| 23 | br label %"4" |
| 24 | 4: |
| 25 | ret void |
| 26 | } |
| 27 | ; CHECK-NOT: => |
| 28 | ; CHECK: [0] 0 => <Function Return> |
Jakub Kuderski | 638c085 | 2017-08-15 18:14:57 +0000 | [diff] [blame] | 29 | ; CHECK-NOT: [1] |
| 30 | ; STAT: 1 region - The # of regions |
Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 31 | |
Jakub Kuderski | 638c085 | 2017-08-15 18:14:57 +0000 | [diff] [blame] | 32 | ; BBIT: 0, 1, 2, 5, 11, 6, 12, 3, 4, |
Tobias Grosser | 336734a | 2010-07-22 07:46:31 +0000 | [diff] [blame] | 33 | |
Jakub Kuderski | 638c085 | 2017-08-15 18:14:57 +0000 | [diff] [blame] | 34 | ; RNIT: 0, 1, 2, 5, 11, 6, 12, 3, 4, |