fix rdar://9297011 - udiv by power of two causing fast-isel rejects
[oota-llvm.git] / test / Analysis / RegionInfo / loop_with_condition.ll
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s
3
4 ; RUN: opt -regions -print-region-style=bb  -analyze < %s |& FileCheck -check-prefix=BBIT %s
5 ; RUN: opt -regions -print-region-style=rn  -analyze < %s |& FileCheck -check-prefix=RNIT %s
6
7 define void @normal_condition() nounwind {
8 0:
9         br label %"1"
10 1:
11         br i1 1, label %"6", label %"2"
12 2:
13         br i1 1, label %"3", label %"4"
14 3:
15         br label %"5"
16 4:
17         br label %"5"
18 5:
19         br label %"8"
20 8:
21         br i1 1, label %"7", label %"9"
22 9:
23         br label %"2"
24 7:
25         br label %"6"
26 6:
27         ret void
28 }
29
30 ; CHECK-NOT: =>
31 ; CHECK: [0] 0 => <Function Return>
32 ; CHECK-NEXT: [1] 1 => 6
33 ; CHECK-NEXT:   [2] 2 => 7
34 ; CHECK-NEXT:     [3] 2 => 5
35 ; STAT: 4 region - The # of regions
36 ; STAT: 1 region - The # of simple regions
37
38 ; BBIT: 0, 1, 6, 2, 3, 5, 8, 7, 9, 4,
39 ; BBIT: 1, 2, 3, 5, 8, 7, 9, 4,
40 ; BBIT: 2, 3, 5, 8, 9, 4,
41 ; BBIT: 2, 3, 4,
42
43 ; RNIT: 0, 1 => 6, 6,
44 ; RNIT: 1, 2 => 7, 7,
45 ; RNIT: 2 => 5, 5, 8, 9,
46 ; RNIT: 2, 3, 4,