blob: 0499082813b0a3fa366e5157485986b794b7354f [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 | FileCheck %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
Hongbin Zhengbc539772016-02-25 17:54:25 +00007; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s
8
Tobias Grosser336734a2010-07-22 07:46:31 +00009define void @normal_condition() nounwind {
100:
11 br i1 1, label %"1", label %"4"
12
131:
14 br i1 1, label %"2", label %"3"
152:
16 br label %"4"
173:
18 br label %"4"
194:
20 ret void
21}
22; CHECK-NOT: =>
23; CHECK: [0] 0 => <Function Return>
24; CHECK-NEXT: [1] 0 => 4
25; CHECK-NEXT: [2] 1 => 4
26; STAT: 3 region - The # of regions
27
28; BBIT: 0, 1, 2, 4, 3,
29; BBIT: 0, 1, 2, 3,
30; BBIT: 1, 2, 3,
31
32; RNIT: 0 => 4, 4,
33; RNIT: 0, 1 => 4,
34; RNIT: 1, 2, 3,