1 ; RUN: opt < %s -domtree -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-OLDPM 2 ; RUN: opt < %s -disable-output -passes='print<domtree>' 2>&1 | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-NEWPM 3 4 define void @test1() { 5 ; CHECK-OLDPM-LABEL: 'Dominator Tree Construction' for function 'test1': 6 ; CHECK-NEWPM-LABEL: DominatorTree for function: test1 7 ; CHECK: [1] %entry 8 ; CHECK-NEXT: [2] %a 9 ; CHECK-NEXT: [2] %c 10 ; CHECK-NEXT: [3] %d 11 ; CHECK-NEXT: [3] %e 12 ; CHECK-NEXT: [2] %b 13 14 entry: 15 br i1 undef, label %a, label %b 16 17 a: 18 br label %c 19 20 b: 21 br label %c 22 23 c: 24 br i1 undef, label %d, label %e 25 26 d: 27 ret void 28 29 e: 30 ret void 31 } 32 33 define void @test2() { 34 ; CHECK-OLDPM-LABEL: 'Dominator Tree Construction' for function 'test2': 35 ; CHECK-NEWPM-LABEL: DominatorTree for function: test2 36 ; CHECK: [1] %entry 37 ; CHECK-NEXT: [2] %a 38 ; CHECK-NEXT: [3] %b 39 ; CHECK-NEXT: [4] %c 40 ; CHECK-NEXT: [5] %d 41 ; CHECK-NEXT: [5] %ret 42 43 entry: 44 br label %a 45 46 a: 47 br label %b 48 49 b: 50 br i1 undef, label %a, label %c 51 52 c: 53 br i1 undef, label %d, label %ret 54 55 d: 56 br i1 undef, label %a, label %ret 57 58 ret: 59 ret void 60 } 61