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 8define void @a_linear_impl_fig_1() nounwind { 90: 10 11 br i1 1, label %"1", label %"15" 121: 13 switch i32 0, label %"2" [ i32 0, label %"3" 14 i32 1, label %"7"] 152: 16 br label %"4" 173: 18 br label %"5" 194: 20 br label %"6" 215: 22 br label %"6" 236: 24 br label %"7" 257: 26 br label %"15" 2715: 28 br label %"8" 298: 30 br label %"16" 3116: 32 br label %"9" 339: 34 br i1 1, label %"10", label %"11" 3511: 36 br i1 1, label %"13", label %"12" 3713: 38 br label %"14" 3912: 40 br label %"14" 4114: 42 br label %"8" 4310: 44 br label %"17" 4517: 46 br label %"18" 4718: 48 ret void 49} 50 51; CHECK-NOT: => 52; CHECK: [0] 0 => <Function Return> 53; CHECK-NEXT: [1] 0 => 15 54; CHECK-NEXT: [2] 1 => 7 55; CHECK-NEXT: [1] 8 => 10 56; CHECK-NEXT: [2] 11 => 14 57; STAT: 5 region - The # of regions 58; STAT: 1 region - The # of simple regions 59 60; BBIT: 0, 1, 2, 4, 6, 7, 15, 8, 16, 9, 10, 17, 18, 11, 13, 14, 12, 3, 5, 61; BBIT: 0, 1, 2, 4, 6, 7, 3, 5, 62; BBIT: 1, 2, 4, 6, 3, 5, 63; BBIT: 8, 16, 9, 11, 13, 14, 12, 64; BBIT: 11, 13, 12, 65 66; RNIT: 0 => 15, 15, 8 => 10, 10, 17, 18, 67; RNIT: 0, 1 => 7, 7, 68; RNIT: 1, 2, 4, 6, 3, 5, 69; RNIT: 8, 16, 9, 11 => 14, 14, 70; RNIT: 11, 13, 12, 71