xref: /llvm-project/llvm/test/Analysis/RegionInfo/block_sort.ll (revision 50153213c80286c6c91da4612aaf234cc6438c63)
1; REQUIRES: asserts
2
3; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s
4; RUN: opt < %s -passes='print<regions>' -stats 2>&1 | FileCheck -check-prefix=STAT %s
5; RUN: opt -passes='print<regions>' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s
6; RUN: opt -passes='print<regions>' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s
7
8define void @BZ2_blockSort() nounwind {
9start:
10  br label %while
11
12while:
13  br label %while.body134.i.i
14
15while.body134.i.i:
16  br i1 1, label %end, label %w
17
18w:
19  br label %if.end140.i.i
20
21if.end140.i.i:
22  br i1 1, label %while.end186.i.i, label %if.end183.i.i
23
24if.end183.i.i:
25  br label %while.body134.i.i
26
27while.end186.i.i:
28  br label %while
29
30end:
31  ret void
32}
33; CHECK-NOT: =>
34; CHECK: [0] start => <Function Return>
35; CHECK: [1] while => end
36
37; STAT: 2 region - The # of regions
38; STAT: 1 region - The # of simple regions
39
40; BBIT: start, while, while.body134.i.i, end, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
41; BBIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
42
43; RNIT: start, while => end, end,
44; RNIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
45