inline_negative_result.ll
1.31 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
58
59
60
61
62
63
64
65
66
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -inline -S | FileCheck %s
; PR42084
define internal fastcc void @func4() {
; CHECK-LABEL: @func4(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[FOR_COND:%.*]]
; CHECK: for.cond:
; CHECK-NEXT: tail call void (...) @g()
; CHECK-NEXT: br label [[FOR_COND]]
;
entry:
br label %for.cond
for.cond:
tail call void (...) @g()
br label %for.cond
}
define internal fastcc void @func3() {
; CHECK-LABEL: @func3(
; CHECK-NEXT: entry:
; CHECK-NEXT: tail call fastcc void @func4()
; CHECK-NEXT: unreachable
;
entry:
tail call fastcc void @func4()
unreachable
}
define internal fastcc void @func2() {
; CHECK-LABEL: @func2(
; CHECK-NEXT: entry:
; CHECK-NEXT: tail call fastcc void @func3()
; CHECK-NEXT: unreachable
;
entry:
tail call fastcc void @func3()
unreachable
}
define internal fastcc void @func1() {
; CHECK-LABEL: @func1(
; CHECK-NEXT: entry:
; CHECK-NEXT: tail call fastcc void @func2()
; CHECK-NEXT: unreachable
;
entry:
tail call fastcc void @func2()
unreachable
}
define i32 @main() {
; CHECK-LABEL: @main(
; CHECK-NEXT: entry:
; CHECK-NEXT: tail call fastcc void @func1()
; CHECK-NEXT: unreachable
;
entry:
tail call fastcc void @func1()
unreachable
}
declare void @g(...)