• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -inline -early-cse -earlycse-debug-hash < %s
2; This test used to crash (PR35469).
3
4define void @func1() {
5  %t = bitcast void ()* @func2 to void ()*
6  tail call void %t()
7  ret void
8}
9
10define void @func2() {
11  %t = bitcast void ()* @func3 to void ()*
12  tail call void %t()
13  ret void
14}
15
16define void @func3() {
17  %t = bitcast void ()* @func4 to void ()*
18  tail call void %t()
19  ret void
20}
21
22define void @func4() {
23  br i1 undef, label %left, label %right
24
25left:
26  %t = bitcast void ()* @func5 to void ()*
27  tail call void %t()
28  ret void
29
30right:
31  ret void
32}
33
34define void @func5() {
35  %t = bitcast void ()* @func6 to void ()*
36  tail call void %t()
37  ret void
38}
39
40define void @func6() {
41  %t = bitcast void ()* @func2 to void ()*
42  tail call void %t()
43  ret void
44}
45
46define void @func7() {
47  %t = bitcast void ()* @func3 to void ()*
48  tail call void @func8(void()* %t)
49  ret void
50}
51
52define void @func8(void()* %f) {
53  tail call void %f()
54  ret void
55}
56