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 @a_linear_impl_fig_1() nounwind { 110: 12 13 br i1 1, label %"1", label %"15" 141: 15 switch i32 0, label %"2" [ i32 0, label %"3" 16 i32 1, label %"7"] 172: 18 br label %"4" 193: 20 br label %"5" 214: 22 br label %"6" 235: 24 br label %"6" 256: 26 br label %"7" 277: 28 br label %"15" 2915: 30 br label %"8" 318: 32 br label %"16" 3316: 34 br label %"9" 359: 36 br i1 1, label %"10", label %"11" 3711: 38 br i1 1, label %"13", label %"12" 3913: 40 br label %"14" 4112: 42 br label %"14" 4314: 44 br label %"8" 4510: 46 br label %"17" 4717: 48 br label %"18" 4918: 50 ret void 51} 52 53; CHECK-NOT: => 54; CHECK: [0] 0 => <Function Return> 55; CHECK-NEXT: [1] 0 => 15 56; CHECK-NEXT: [2] 1 => 7 57; CHECK-NEXT: [1] 8 => 10 58; CHECK-NEXT: [2] 11 => 14 59; STAT: 5 region - The # of regions 60; STAT: 1 region - The # of simple regions 61 62; BBIT: 0, 1, 2, 4, 6, 7, 15, 8, 16, 9, 10, 17, 18, 11, 13, 14, 12, 3, 5, 63; BBIT: 0, 1, 2, 4, 6, 7, 3, 5, 64; BBIT: 1, 2, 4, 6, 3, 5, 65; BBIT: 8, 16, 9, 11, 13, 14, 12, 66; BBIT: 11, 13, 12, 67 68; RNIT: 0 => 15, 15, 8 => 10, 10, 17, 18, 69; RNIT: 0, 1 => 7, 7, 70; RNIT: 1, 2, 4, 6, 3, 5, 71; RNIT: 8, 16, 9, 11 => 14, 14, 72; RNIT: 11, 13, 12, 73