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