• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: asserts
2; RUN: opt -regions -analyze < %s | FileCheck %s
3; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
4
5; RUN: opt -regions -print-region-style=bb  -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
6; RUN: opt -regions -print-region-style=rn  -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
7
8; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s
9
10define void @normal_condition() nounwind {
110:
12        br label %"1"
131:
14	br i1 1, label %"6", label %"2"
152:
16	br i1 1, label %"3", label %"4"
173:
18	br label %"5"
194:
20	br label %"5"
215:
22        br label %"8"
238:
24        br i1 1, label %"7", label %"9"
259:
26        br label %"2"
277:
28        br label %"6"
296:
30	ret void
31}
32
33; CHECK-NOT: =>
34; CHECK: [0] 0 => <Function Return>
35; CHECK-NEXT: [1] 1 => 6
36; CHECK-NEXT:   [2] 2 => 7
37; CHECK-NEXT:     [3] 2 => 5
38; STAT: 4 region - The # of regions
39; STAT: 1 region - The # of simple regions
40
41; BBIT: 0, 1, 6, 2, 3, 5, 8, 7, 9, 4,
42; BBIT: 1, 2, 3, 5, 8, 7, 9, 4,
43; BBIT: 2, 3, 5, 8, 9, 4,
44; BBIT: 2, 3, 4,
45
46; RNIT: 0, 1 => 6, 6,
47; RNIT: 1, 2 => 7, 7,
48; RNIT: 2 => 5, 5, 8, 9,
49; RNIT: 2, 3, 4,
50