xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/2009-07-16-CoalescerBug.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin10
2*9880d681SAndroid Build Coastguard Worker; rdar://7059496
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker	%struct.brinfo = type <{ %struct.brinfo*, %struct.brinfo*, i8*, i32, i32, i32, i8, i8, i8, i8 }>
5*9880d681SAndroid Build Coastguard Worker	%struct.cadata = type <{ i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32, %struct.cmatcher*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i8, i8, i8, i8 }>
6*9880d681SAndroid Build Coastguard Worker	%struct.cline = type <{ %struct.cline*, i32, i8, i8, i8, i8, i8*, i32, i8, i8, i8, i8, i8*, i32, i8, i8, i8, i8, i8*, i32, i32, %struct.cline*, %struct.cline*, i32, i32 }>
7*9880d681SAndroid Build Coastguard Worker	%struct.cmatch = type <{ i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i8, i8, i8, i8, i32*, i32*, i8*, i8*, i32, i32, i32, i32, i16, i8, i8, i16, i8, i8 }>
8*9880d681SAndroid Build Coastguard Worker	%struct.cmatcher = type <{ i32, i8, i8, i8, i8, %struct.cmatcher*, i32, i8, i8, i8, i8, %struct.cpattern*, i32, i8, i8, i8, i8, %struct.cpattern*, i32, i8, i8, i8, i8, %struct.cpattern*, i32, i8, i8, i8, i8, %struct.cpattern*, i32, i8, i8, i8, i8 }>
9*9880d681SAndroid Build Coastguard Worker	%struct.cpattern = type <{ %struct.cpattern*, i32, i8, i8, i8, i8, %union.anon }>
10*9880d681SAndroid Build Coastguard Worker	%struct.patprog = type <{ i64, i64, i64, i64, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8 }>
11*9880d681SAndroid Build Coastguard Worker	%union.anon = type <{ [8 x i8] }>
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine i32 @addmatches(%struct.cadata* %dat, i8** nocapture %argv) nounwind ssp {
14*9880d681SAndroid Build Coastguard Workerentry:
15*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.else, label %if.then91
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Workerif.then91:		; preds = %entry
18*9880d681SAndroid Build Coastguard Worker	br label %if.end96
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Workerif.else:		; preds = %entry
21*9880d681SAndroid Build Coastguard Worker	br label %if.end96
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workerif.end96:		; preds = %if.else, %if.then91
24*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %lor.lhs.false, label %if.then105
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerlor.lhs.false:		; preds = %if.end96
27*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.else139, label %if.then105
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Workerif.then105:		; preds = %lor.lhs.false, %if.end96
30*9880d681SAndroid Build Coastguard Worker	unreachable
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Workerif.else139:		; preds = %lor.lhs.false
33*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %land.end, label %land.rhs
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Workerland.rhs:		; preds = %if.else139
36*9880d681SAndroid Build Coastguard Worker	unreachable
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Workerland.end:		; preds = %if.else139
39*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %land.lhs.true285, label %if.then315
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Workerland.lhs.true285:		; preds = %land.end
42*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end324, label %if.then322
43*9880d681SAndroid Build Coastguard Worker
44*9880d681SAndroid Build Coastguard Workerif.then315:		; preds = %land.end
45*9880d681SAndroid Build Coastguard Worker	unreachable
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Workerif.then322:		; preds = %land.lhs.true285
48*9880d681SAndroid Build Coastguard Worker	unreachable
49*9880d681SAndroid Build Coastguard Worker
50*9880d681SAndroid Build Coastguard Workerif.end324:		; preds = %land.lhs.true285
51*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end384, label %if.then358
52*9880d681SAndroid Build Coastguard Worker
53*9880d681SAndroid Build Coastguard Workerif.then358:		; preds = %if.end324
54*9880d681SAndroid Build Coastguard Worker	unreachable
55*9880d681SAndroid Build Coastguard Worker
56*9880d681SAndroid Build Coastguard Workerif.end384:		; preds = %if.end324
57*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end394, label %land.lhs.true387
58*9880d681SAndroid Build Coastguard Worker
59*9880d681SAndroid Build Coastguard Workerland.lhs.true387:		; preds = %if.end384
60*9880d681SAndroid Build Coastguard Worker	unreachable
61*9880d681SAndroid Build Coastguard Worker
62*9880d681SAndroid Build Coastguard Workerif.end394:		; preds = %if.end384
63*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end498, label %land.lhs.true399
64*9880d681SAndroid Build Coastguard Worker
65*9880d681SAndroid Build Coastguard Workerland.lhs.true399:		; preds = %if.end394
66*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end498, label %if.then406
67*9880d681SAndroid Build Coastguard Worker
68*9880d681SAndroid Build Coastguard Workerif.then406:		; preds = %land.lhs.true399
69*9880d681SAndroid Build Coastguard Worker	unreachable
70*9880d681SAndroid Build Coastguard Worker
71*9880d681SAndroid Build Coastguard Workerif.end498:		; preds = %land.lhs.true399, %if.end394
72*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end514, label %if.then503
73*9880d681SAndroid Build Coastguard Worker
74*9880d681SAndroid Build Coastguard Workerif.then503:		; preds = %if.end498
75*9880d681SAndroid Build Coastguard Worker	unreachable
76*9880d681SAndroid Build Coastguard Worker
77*9880d681SAndroid Build Coastguard Workerif.end514:		; preds = %if.end498
78*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end585, label %if.then520
79*9880d681SAndroid Build Coastguard Worker
80*9880d681SAndroid Build Coastguard Workerif.then520:		; preds = %if.end514
81*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %lor.lhs.false547, label %if.then560
82*9880d681SAndroid Build Coastguard Worker
83*9880d681SAndroid Build Coastguard Workerlor.lhs.false547:		; preds = %if.then520
84*9880d681SAndroid Build Coastguard Worker	unreachable
85*9880d681SAndroid Build Coastguard Worker
86*9880d681SAndroid Build Coastguard Workerif.then560:		; preds = %if.then520
87*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end585, label %land.lhs.true566
88*9880d681SAndroid Build Coastguard Worker
89*9880d681SAndroid Build Coastguard Workerland.lhs.true566:		; preds = %if.then560
90*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end585, label %if.then573
91*9880d681SAndroid Build Coastguard Worker
92*9880d681SAndroid Build Coastguard Workerif.then573:		; preds = %land.lhs.true566
93*9880d681SAndroid Build Coastguard Worker	unreachable
94*9880d681SAndroid Build Coastguard Worker
95*9880d681SAndroid Build Coastguard Workerif.end585:		; preds = %land.lhs.true566, %if.then560, %if.end514
96*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %cond.true593, label %cond.false599
97*9880d681SAndroid Build Coastguard Worker
98*9880d681SAndroid Build Coastguard Workercond.true593:		; preds = %if.end585
99*9880d681SAndroid Build Coastguard Worker	unreachable
100*9880d681SAndroid Build Coastguard Worker
101*9880d681SAndroid Build Coastguard Workercond.false599:		; preds = %if.end585
102*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end647, label %if.then621
103*9880d681SAndroid Build Coastguard Worker
104*9880d681SAndroid Build Coastguard Workerif.then621:		; preds = %cond.false599
105*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %cond.true624, label %cond.false630
106*9880d681SAndroid Build Coastguard Worker
107*9880d681SAndroid Build Coastguard Workercond.true624:		; preds = %if.then621
108*9880d681SAndroid Build Coastguard Worker	br label %if.end647
109*9880d681SAndroid Build Coastguard Worker
110*9880d681SAndroid Build Coastguard Workercond.false630:		; preds = %if.then621
111*9880d681SAndroid Build Coastguard Worker	unreachable
112*9880d681SAndroid Build Coastguard Worker
113*9880d681SAndroid Build Coastguard Workerif.end647:		; preds = %cond.true624, %cond.false599
114*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end723, label %if.then701
115*9880d681SAndroid Build Coastguard Worker
116*9880d681SAndroid Build Coastguard Workerif.then701:		; preds = %if.end647
117*9880d681SAndroid Build Coastguard Worker	br label %if.end723
118*9880d681SAndroid Build Coastguard Worker
119*9880d681SAndroid Build Coastguard Workerif.end723:		; preds = %if.then701, %if.end647
120*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.else1090, label %if.then729
121*9880d681SAndroid Build Coastguard Worker
122*9880d681SAndroid Build Coastguard Workerif.then729:		; preds = %if.end723
123*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end887, label %if.then812
124*9880d681SAndroid Build Coastguard Worker
125*9880d681SAndroid Build Coastguard Workerif.then812:		; preds = %if.then729
126*9880d681SAndroid Build Coastguard Worker	unreachable
127*9880d681SAndroid Build Coastguard Worker
128*9880d681SAndroid Build Coastguard Workerif.end887:		; preds = %if.then729
129*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end972, label %if.then893
130*9880d681SAndroid Build Coastguard Worker
131*9880d681SAndroid Build Coastguard Workerif.then893:		; preds = %if.end887
132*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end919, label %if.then903
133*9880d681SAndroid Build Coastguard Worker
134*9880d681SAndroid Build Coastguard Workerif.then903:		; preds = %if.then893
135*9880d681SAndroid Build Coastguard Worker	unreachable
136*9880d681SAndroid Build Coastguard Worker
137*9880d681SAndroid Build Coastguard Workerif.end919:		; preds = %if.then893
138*9880d681SAndroid Build Coastguard Worker	br label %if.end972
139*9880d681SAndroid Build Coastguard Worker
140*9880d681SAndroid Build Coastguard Workerif.end972:		; preds = %if.end919, %if.end887
141*9880d681SAndroid Build Coastguard Worker	%sline.0 = phi %struct.cline* [ undef, %if.end919 ], [ null, %if.end887 ]		; <%struct.cline*> [#uses=5]
142*9880d681SAndroid Build Coastguard Worker	%bcs.0 = phi i32 [ undef, %if.end919 ], [ 0, %if.end887 ]		; <i32> [#uses=5]
143*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1146, label %land.lhs.true975
144*9880d681SAndroid Build Coastguard Worker
145*9880d681SAndroid Build Coastguard Workerland.lhs.true975:		; preds = %if.end972
146*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1146, label %if.then980
147*9880d681SAndroid Build Coastguard Worker
148*9880d681SAndroid Build Coastguard Workerif.then980:		; preds = %land.lhs.true975
149*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %cond.false1025, label %cond.false1004
150*9880d681SAndroid Build Coastguard Worker
151*9880d681SAndroid Build Coastguard Workercond.false1004:		; preds = %if.then980
152*9880d681SAndroid Build Coastguard Worker	unreachable
153*9880d681SAndroid Build Coastguard Worker
154*9880d681SAndroid Build Coastguard Workercond.false1025:		; preds = %if.then980
155*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1146, label %if.then1071
156*9880d681SAndroid Build Coastguard Worker
157*9880d681SAndroid Build Coastguard Workerif.then1071:		; preds = %cond.false1025
158*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.then1074, label %if.end1081
159*9880d681SAndroid Build Coastguard Worker
160*9880d681SAndroid Build Coastguard Workerif.then1074:		; preds = %if.then1071
161*9880d681SAndroid Build Coastguard Worker	br label %if.end1081
162*9880d681SAndroid Build Coastguard Worker
163*9880d681SAndroid Build Coastguard Workerif.end1081:		; preds = %if.then1074, %if.then1071
164*9880d681SAndroid Build Coastguard Worker	%call1083 = call %struct.patprog* @patcompile(i8* undef, i32 0, i8** null) nounwind ssp		; <%struct.patprog*> [#uses=2]
165*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1146, label %if.then1086
166*9880d681SAndroid Build Coastguard Worker
167*9880d681SAndroid Build Coastguard Workerif.then1086:		; preds = %if.end1081
168*9880d681SAndroid Build Coastguard Worker	br label %if.end1146
169*9880d681SAndroid Build Coastguard Worker
170*9880d681SAndroid Build Coastguard Workerif.else1090:		; preds = %if.end723
171*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1146, label %land.lhs.true1093
172*9880d681SAndroid Build Coastguard Worker
173*9880d681SAndroid Build Coastguard Workerland.lhs.true1093:		; preds = %if.else1090
174*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1146, label %if.then1098
175*9880d681SAndroid Build Coastguard Worker
176*9880d681SAndroid Build Coastguard Workerif.then1098:		; preds = %land.lhs.true1093
177*9880d681SAndroid Build Coastguard Worker	unreachable
178*9880d681SAndroid Build Coastguard Worker
179*9880d681SAndroid Build Coastguard Workerif.end1146:		; preds = %land.lhs.true1093, %if.else1090, %if.then1086, %if.end1081, %cond.false1025, %land.lhs.true975, %if.end972
180*9880d681SAndroid Build Coastguard Worker	%cp.0 = phi %struct.patprog* [ %call1083, %if.then1086 ], [ null, %if.end972 ], [ null, %land.lhs.true975 ], [ null, %cond.false1025 ], [ %call1083, %if.end1081 ], [ null, %if.else1090 ], [ null, %land.lhs.true1093 ]		; <%struct.patprog*> [#uses=1]
181*9880d681SAndroid Build Coastguard Worker	%sline.1 = phi %struct.cline* [ %sline.0, %if.then1086 ], [ %sline.0, %if.end972 ], [ %sline.0, %land.lhs.true975 ], [ %sline.0, %cond.false1025 ], [ %sline.0, %if.end1081 ], [ null, %if.else1090 ], [ null, %land.lhs.true1093 ]		; <%struct.cline*> [#uses=1]
182*9880d681SAndroid Build Coastguard Worker	%bcs.1 = phi i32 [ %bcs.0, %if.then1086 ], [ %bcs.0, %if.end972 ], [ %bcs.0, %land.lhs.true975 ], [ %bcs.0, %cond.false1025 ], [ %bcs.0, %if.end1081 ], [ 0, %if.else1090 ], [ 0, %land.lhs.true1093 ]		; <i32> [#uses=1]
183*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1307, label %do.body1270
184*9880d681SAndroid Build Coastguard Worker
185*9880d681SAndroid Build Coastguard Workerdo.body1270:		; preds = %if.end1146
186*9880d681SAndroid Build Coastguard Worker	unreachable
187*9880d681SAndroid Build Coastguard Worker
188*9880d681SAndroid Build Coastguard Workerif.end1307:		; preds = %if.end1146
189*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %if.end1318, label %if.then1312
190*9880d681SAndroid Build Coastguard Worker
191*9880d681SAndroid Build Coastguard Workerif.then1312:		; preds = %if.end1307
192*9880d681SAndroid Build Coastguard Worker	unreachable
193*9880d681SAndroid Build Coastguard Worker
194*9880d681SAndroid Build Coastguard Workerif.end1318:		; preds = %if.end1307
195*9880d681SAndroid Build Coastguard Worker	br i1 undef, label %for.cond1330.preheader, label %if.then1323
196*9880d681SAndroid Build Coastguard Worker
197*9880d681SAndroid Build Coastguard Workerif.then1323:		; preds = %if.end1318
198*9880d681SAndroid Build Coastguard Worker	unreachable
199*9880d681SAndroid Build Coastguard Worker
200*9880d681SAndroid Build Coastguard Workerfor.cond1330.preheader:		; preds = %if.end1318
201*9880d681SAndroid Build Coastguard Worker	%call1587 = call i8* @comp_match(i8* undef, i8* undef, i8* undef, %struct.patprog* %cp.0, %struct.cline** undef, i32 0, %struct.brinfo** undef, i32 0, %struct.brinfo** undef, i32 %bcs.1, i32* undef) nounwind ssp		; <i8*> [#uses=0]
202*9880d681SAndroid Build Coastguard Worker	%call1667 = call %struct.cmatch* @add_match_data(i32 0, i8* undef, i8* undef, %struct.cline* undef, i8* undef, i8* null, i8* undef, i8* undef, i8* undef, i8* undef, %struct.cline* null, i8* undef, %struct.cline* %sline.1, i8* undef, i32 undef, i32 undef) ssp		; <%struct.cmatch*> [#uses=0]
203*9880d681SAndroid Build Coastguard Worker	unreachable
204*9880d681SAndroid Build Coastguard Worker}
205*9880d681SAndroid Build Coastguard Worker
206*9880d681SAndroid Build Coastguard Workerdeclare %struct.patprog* @patcompile(i8*, i32, i8**) ssp
207*9880d681SAndroid Build Coastguard Worker
208*9880d681SAndroid Build Coastguard Workerdeclare i8* @comp_match(i8*, i8*, i8*, %struct.patprog*, %struct.cline**, i32, %struct.brinfo**, i32, %struct.brinfo**, i32, i32*) ssp
209*9880d681SAndroid Build Coastguard Worker
210*9880d681SAndroid Build Coastguard Workerdeclare %struct.cmatch* @add_match_data(i32, i8*, i8*, %struct.cline*, i8*, i8*, i8*, i8*, i8*, i8*, %struct.cline*, i8*, %struct.cline*, i8*, i32, i32) nounwind ssp
211