blob: 1145ffdba0395e9dbfdddd9478d0503e83f0b375 [file] [log] [blame]
Tobias Grosserf96b0062010-07-22 07:46:31 +00001; RUN: opt -regions -analyze < %s | FileCheck %s
Chandler Carruth49589f02012-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 Grosserf96b0062010-07-22 07:46:31 +00005
6define void @normal_condition() nounwind {
75:
8 br label %"0"
9
100:
11 br label %"1"
121:
13 br i1 1, label %"2", label %"3"
142:
15 ret void
163:
17 br i1 1, label %"1", label %"4"
184:
19 br label %"0"
20}
21
22; CHECK-NOT: =>
23; CHECK: [0] 5 => <Function Return>
24; CHECK: [1] 0 => 2
25
26; STAT: 2 region - The # of regions
27; STAT: 1 region - The # of simple regions
28
29; BBIT: 5, 0, 1, 2, 3, 4,
30; BBIT: 0, 1, 3, 4,
31
32; RNIT: 5, 0 => 2, 2,
33; RNIT: 0, 1, 3, 4,