blob: a8227e340c5e80a288a4c6a2e76572a7902fb586 [file] [log] [blame]
Tobias Grosser336734a2010-07-22 07:46:31 +00001; RUN: opt -regions -analyze < %s
Chandler Carruth5da53432012-07-02 18:37:59 +00002; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
Tobias Grosser336734a2010-07-22 07:46:31 +00005
6define void @normal_condition() nounwind {
70:
8 br label %"1"
91:
10 br i1 1, label %"2", label %"3"
112:
12 br label %"5"
135:
14 br i1 1, label %"11", label %"12"
1511:
16 br label %"6"
1712:
18 br label %"6"
196:
20 br label %"2"
213:
22 br label %"4"
234:
24 ret void
25}
26; CHECK-NOT: =>
27; CHECK: [0] 0 => <Function Return>
28; CHECK: [1] 1 => 3
29; STAT: 2 region - The # of regions
30; STAT: 1 region - The # of simple regions
31
32; BBIT: 0, 1, 2, 5, 11, 6, 12, 3, 4,
33; BBIT: 1, 2, 5, 11, 6, 12,
34
35; RNIT: 0, 1 => 3, 3, 4,
36; RNIT: 1, 2, 5, 11, 6, 12,