Stackmap shadows should consider call returns a branch target.
[oota-llvm.git] / test / CodeGen / X86 / 2012-05-19-CoalescerCrash.ll
1 ; RUN: llc < %s -verify-coalescing
2 ; PR12892
3 ;
4 ; Dead code elimination during coalesing causes a live range to split into two
5 ; virtual registers. Stale identity copies that had already been joined were
6 ; interfering with the liveness computations.
7
8 target triple = "i386-pc-linux-gnu"
9
10 define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
11   invoke void @_ZNK4llvm13CodeGenTarget12getAsmParserEv()
12           to label %1 unwind label %5
13
14 ; <label>:1                                       ; preds = %0
15   invoke void @_ZNK4llvm6Record16getValueAsStringENS_9StringRefE()
16           to label %4 unwind label %2
17
18 ; <label>:2                                       ; preds = %1
19   %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
20           cleanup
21   unreachable
22
23 ; <label>:4                                       ; preds = %1
24   invoke void @_ZN4llvm18isCurrentDebugTypeEPKc()
25           to label %12 unwind label %7
26
27 ; <label>:5                                       ; preds = %0
28   %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
29           cleanup
30   br label %33
31
32 ; <label>:7                                       ; preds = %4
33   %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
34           cleanup
35   br label %9
36
37 ; <label>:9                                       ; preds = %28, %7
38   %10 = phi { i8*, i32 } [ %29, %28 ], [ %8, %7 ]
39   %11 = extractvalue { i8*, i32 } %10, 1
40   invoke fastcc void @_ZN12_GLOBAL__N_114AsmMatcherInfoD2Ev()
41           to label %32 unwind label %35
42
43 ; <label>:12                                      ; preds = %4
44   invoke void @_ZNK4llvm13CodeGenTarget10getRegBankEv()
45           to label %13 unwind label %16
46
47 ; <label>:13                                      ; preds = %12
48   br label %14
49
50 ; <label>:14                                      ; preds = %20, %13
51   %15 = icmp eq i32 undef, 0
52   br i1 %15, label %20, label %18
53
54 ; <label>:16                                      ; preds = %12
55   %17 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
56           cleanup
57   br label %26
58
59 ; <label>:18                                      ; preds = %14
60   invoke void @_ZNSs4_Rep9_S_createEjjRKSaIcE()
61           to label %19 unwind label %21
62
63 ; <label>:19                                      ; preds = %18
64   unreachable
65
66 ; <label>:20                                      ; preds = %14
67   br label %14
68
69 ; <label>:21                                      ; preds = %18
70   %22 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
71           cleanup
72   %23 = extractvalue { i8*, i32 } %22, 1
73   br i1 undef, label %26, label %24
74
75 ; <label>:24                                      ; preds = %21
76   br i1 undef, label %25, label %26
77
78 ; <label>:25                                      ; preds = %24
79   unreachable
80
81 ; <label>:26                                      ; preds = %24, %21, %16
82   %27 = phi i32 [ 0, %16 ], [ %23, %21 ], [ %23, %24 ]
83   invoke void @_ZNSt6vectorISt4pairISsSsESaIS1_EED1Ev()
84           to label %28 unwind label %30
85
86 ; <label>:28                                      ; preds = %26
87   %29 = insertvalue { i8*, i32 } undef, i32 %27, 1
88   br label %9
89
90 ; <label>:30                                      ; preds = %26
91   %31 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
92           catch i8* null
93   unreachable
94
95 ; <label>:32                                      ; preds = %9
96   br label %33
97
98 ; <label>:33                                      ; preds = %32, %5
99   %34 = phi i32 [ undef, %5 ], [ %11, %32 ]
100   unreachable
101
102 ; <label>:35                                      ; preds = %9
103   %36 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
104           catch i8* null
105   unreachable
106 }
107
108 declare void @_ZNK4llvm13CodeGenTarget12getAsmParserEv()
109
110 declare i32 @__gxx_personality_v0(...)
111
112 declare void @_ZNK4llvm6Record16getValueAsStringENS_9StringRefE()
113
114 declare void @_ZN4llvm18isCurrentDebugTypeEPKc()
115
116 declare fastcc void @_ZN12_GLOBAL__N_114AsmMatcherInfoD2Ev() unnamed_addr inlinehint align 2
117
118 declare hidden void @_ZNSt6vectorISt4pairISsSsESaIS1_EED1Ev() unnamed_addr align 2
119
120 declare void @_ZNSs4_Rep9_S_createEjjRKSaIcE()
121
122 declare void @_ZNK4llvm13CodeGenTarget10getRegBankEv()