blob: 09feecd96f558ad904b357df12fdea4e58b1a062 [file] [log] [blame]
Jan Wen Voung6dc30762013-03-12 16:27:52 +00001; REQUIRES: asserts
Tobias Grosser336734a2010-07-22 07:46:31 +00002; RUN: opt -regions -analyze < %s
Tobias Grosser670a5d82017-07-29 09:58:43 +00003; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s
Chandler Carruth5da53432012-07-02 18:37:59 +00004; 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 Grosser336734a2010-07-22 07:46:31 +00006
7define void @normal_condition() nounwind {
80:
9 br label %"1"
101:
11 br i1 1, label %"2", label %"3"
122:
13 br label %"5"
145:
15 br i1 1, label %"11", label %"12"
1611:
17 br label %"6"
1812:
19 br label %"6"
206:
21 br label %"2"
223:
23 br label %"4"
244:
25 ret void
26}
27; CHECK-NOT: =>
28; CHECK: [0] 0 => <Function Return>
Jakub Kuderski638c0852017-08-15 18:14:57 +000029; CHECK-NOT: [1]
30; STAT: 1 region - The # of regions
Tobias Grosser336734a2010-07-22 07:46:31 +000031
Jakub Kuderski638c0852017-08-15 18:14:57 +000032; BBIT: 0, 1, 2, 5, 11, 6, 12, 3, 4,
Tobias Grosser336734a2010-07-22 07:46:31 +000033
Jakub Kuderski638c0852017-08-15 18:14:57 +000034; RNIT: 0, 1, 2, 5, 11, 6, 12, 3, 4,