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 @a_linear_impl_fig_1() nounwind { 8 0: 9 10 br i1 1, label %"1", label %"15" 11 1: 12 switch i32 0, label %"2" [ i32 0, label %"3" 13 i32 1, label %"7"] 14 2: 15 br label %"4" 16 3: 17 br label %"5" 18 4: 19 br label %"6" 20 5: 21 br label %"6" 22 6: 23 br label %"7" 24 7: 25 br label %"15" 26 15: 27 br label %"8" 28 8: 29 br label %"16" 30 16: 31 br label %"9" 32 9: 33 br i1 1, label %"10", label %"11" 34 11: 35 br i1 1, label %"13", label %"12" 36 13: 37 br label %"14" 38 12: 39 br label %"14" 40 14: 41 br label %"8" 42 10: 43 br label %"17" 44 17: 45 br label %"18" 46 18: 47 ret void 48 } 49 50 ; CHECK-NOT: => 51 ; CHECK: [0] 0 => <Function Return> 52 ; CHECK-NEXT: [1] 0 => 15 53 ; CHECK-NEXT: [2] 1 => 7 54 ; CHECK-NEXT: [1] 8 => 10 55 ; CHECK-NEXT: [2] 11 => 14 56 ; STAT: 5 region - The # of regions 57 ; STAT: 1 region - The # of simple regions 58 59 ; BBIT: 0, 1, 2, 4, 6, 7, 15, 8, 16, 9, 10, 17, 18, 11, 13, 14, 12, 3, 5, 60 ; BBIT: 0, 1, 2, 4, 6, 7, 3, 5, 61 ; BBIT: 1, 2, 4, 6, 3, 5, 62 ; BBIT: 8, 16, 9, 11, 13, 14, 12, 63 ; BBIT: 11, 13, 12, 64 65 ; RNIT: 0 => 15, 15, 8 => 10, 10, 17, 18, 66 ; RNIT: 0, 1 => 7, 7, 67 ; RNIT: 1, 2, 4, 6, 3, 5, 68 ; RNIT: 8, 16, 9, 11 => 14, 14, 69 ; RNIT: 11, 13, 12, 70