1 ; RUN: opt %s -passes=dot-dom -disable-output
2 ; RUN: FileCheck %s -input-file=dom.test1.dot -check-prefix=TEST1
3 ; RUN: FileCheck %s -input-file=dom.test2.dot -check-prefix=TEST2
6 ; TEST1: digraph "Dominator tree for 'test1' function"
7 ; TEST1-NEXT: label="Dominator tree for 'test1' function"
8 ; TEST1: Node0x[[EntryID:.*]] [shape=record,label="{entry:
9 ; TEST1-NEXT: Node0x[[EntryID]] -> Node0x[[A_ID:.*]];
10 ; TEST1-NEXT: Node0x[[EntryID]] -> Node0x[[C_ID:.*]];
11 ; TEST1-NEXT: Node0x[[EntryID]] -> Node0x[[B_ID:.*]];
12 ; TEST1-NEXT: Node0x[[A_ID]] [shape=record,label="{a:
13 ; TEST1-NEXT: Node0x[[C_ID]] [shape=record,label="{c:
14 ; TEST1-NEXT: Node0x[[C_ID]] -> Node0x[[D_ID:.*]];
15 ; TEST1-NEXT: Node0x[[C_ID]] -> Node0x[[E_ID:.*]];
16 ; TEST1-NEXT: Node0x[[D_ID]] [shape=record,label="{d:
17 ; TEST1-NEXT: Node0x[[E_ID]] [shape=record,label="{e:
18 ; TEST1-NEXT: Node0x[[B_ID]] [shape=record,label="{b:
21 br i1 undef, label %a, label %b
30 br i1 undef, label %d, label %e
39 define void @test2() {
40 ; TEST2: digraph "Dominator tree for 'test2' function"
41 ; TEST2-NEXT: label="Dominator tree for 'test2' function"
42 ; TEST2: Node0x[[EntryID:.*]] [shape=record,label="{entry:
43 ; TEST2-NEXT: Node0x[[EntryID]] -> Node0x[[A_ID:.*]];
44 ; TEST2-NEXT: Node0x[[A_ID]] [shape=record,label="{a:
45 ; TEST2-NEXT: Node0x[[A_ID]] -> Node0x[[B_ID:.*]];
46 ; TEST2-NEXT: Node0x[[B_ID]] [shape=record,label="{b:
47 ; TEST2-NEXT: Node0x[[B_ID]] -> Node0x[[C_ID:.*]];
48 ; TEST2-NEXT: Node0x[[C_ID]] [shape=record,label="{c:
49 ; TEST2-NEXT: Node0x[[C_ID]] -> Node0x[[D_ID:.*]];
50 ; TEST2-NEXT: Node0x[[C_ID]] -> Node0x[[E_ID:.*]];
51 ; TEST2-NEXT: Node0x[[D_ID]] [shape=record,label="{d:
52 ; TEST2-NEXT: Node0x[[E_ID]] [shape=record,label="{e:
61 br i1 undef, label %a, label %c
64 br i1 undef, label %d, label %e
67 br i1 undef, label %a, label %e