outline-disjoint-diamonds.ll
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=-1 < %s 2>&1 | FileCheck %s
; CHECK-LABEL: define {{.*}}@fun
; CHECK: call {{.*}}@fun.cold.2(
; CHECK-NEXT: ret void
; CHECK: call {{.*}}@fun.cold.1(
; CHECK-NEXT: ret void
define void @fun() {
entry:
br i1 undef, label %A.then, label %A.else
A.else:
br label %A.then4
A.then4:
br i1 undef, label %A.then5, label %A.end
A.then5:
br label %A.cleanup
A.end:
br label %A.cleanup
A.cleanup:
%A.cleanup.dest.slot.0 = phi i32 [ 1, %A.then5 ], [ 0, %A.end ]
unreachable
A.then:
br i1 undef, label %B.then, label %B.else
B.then:
ret void
B.else:
br label %B.then4
B.then4:
br i1 undef, label %B.then5, label %B.end
B.then5:
br label %B.cleanup
B.end:
br label %B.cleanup
B.cleanup:
%B.cleanup.dest.slot.0 = phi i32 [ 1, %B.then5 ], [ 0, %B.end ]
unreachable
}
; CHECK-LABEL: define {{.*}}@fun.cold.1(
; CHECK: %B.cleanup.dest.slot.0 = phi i32 [ 1, %B.then5 ], [ 0, %B.end ]
; CHECK-NEXT: unreachable
; CHECK-LABEL: define {{.*}}@fun.cold.2(
; CHECK: %A.cleanup.dest.slot.0 = phi i32 [ 1, %A.then5 ], [ 0, %A.end ]
; CHECK-NEXT: unreachable