llvm.org GIT mirror llvm / ee1c870
Eliminate the other half of the BRCOND optimization, and update as many tests as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106749 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
11 changed file(s) with 17 addition(s) and 657 deletion(s). Raw diff Collapse all Expand all
30143014 SDValue N1, SDValue N2, SDValue N3) {
30153015 // Perform various simplifications.
30163016 ConstantSDNode *N1C = dyn_cast(N1.getNode());
3017 ConstantSDNode *N2C = dyn_cast(N2.getNode());
30183017 switch (Opcode) {
30193018 case ISD::CONCAT_VECTORS:
30203019 // A CONCAT_VECTOR with all operands BUILD_VECTOR can be simplified to
30433042 }
30443043
30453044 if (N2 == N3) return N2; // select C, X, X -> X
3046 break;
3047 case ISD::BRCOND:
3048 if (N2C) {
3049 if (!N2C->getZExtValue()) // Unconditional branch
3050 return N1; // Never-taken branch
3051 }
30523045 break;
30533046 case ISD::VECTOR_SHUFFLE:
30543047 llvm_unreachable("should use getVectorShuffle constructor!");
249249 br label %8
250250
251251 ;
252 br i1 undef, label %7, label %10
252 br label %7
253253
254254 ;
255255 br label %8
256256
257257 ;
258 br i1 undef, label %6, label %9
258 br label %6
259259
260260 ;
261261 ret float undef
+0
-433
test/CodeGen/PowerPC/2010-02-26-FoldFloats.ll less more
None ; RUN: llc < %s -O3 | FileCheck %s
1 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128-n32"
2 target triple = "powerpc-apple-darwin9.6"
3
4 ; There should be no stfs spills
5 ; CHECK: main:
6 ; CHECK-NOT: stfs
7 ; CHECK: .section
8
9 @.str66 = external constant [3 x i8], align 4 ; <[3 x i8]*> [#uses=1]
10 @.str31 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=1]
11 @.str61 = external constant [21 x i8], align 4 ; <[21 x i8]*> [#uses=1]
12 @.str101 = external constant [61 x i8], align 4 ; <[61 x i8]*> [#uses=1]
13 @.str104 = external constant [31 x i8], align 4 ; <[31 x i8]*> [#uses=1]
14 @.str105 = external constant [45 x i8], align 4 ; <[45 x i8]*> [#uses=1]
15 @.str112 = external constant [38 x i8], align 4 ; <[38 x i8]*> [#uses=1]
16 @.str121 = external constant [36 x i8], align 4 ; <[36 x i8]*> [#uses=1]
17 @.str12293 = external constant [67 x i8], align 4 ; <[67 x i8]*> [#uses=1]
18 @.str123 = external constant [68 x i8], align 4 ; <[68 x i8]*> [#uses=1]
19 @.str124 = external constant [52 x i8], align 4 ; <[52 x i8]*> [#uses=1]
20 @.str125 = external constant [51 x i8], align 4 ; <[51 x i8]*> [#uses=1]
21
22 define i32 @main(i32 %argc, i8** %argv) noreturn nounwind {
23 entry:
24 br i1 undef, label %bb4.i1, label %my_fopen.exit
25
26 bb4.i1: ; preds = %entry
27 unreachable
28
29 my_fopen.exit: ; preds = %entry
30 br i1 undef, label %bb.i, label %bb1.i
31
32 bb.i: ; preds = %my_fopen.exit
33 unreachable
34
35 bb1.i: ; preds = %my_fopen.exit
36 br label %bb134.i
37
38 bb2.i: ; preds = %bb134.i
39 %0 = icmp eq i32 undef, 0 ; [#uses=1]
40 br i1 %0, label %bb20.i, label %bb21.i
41
42 bb20.i: ; preds = %bb2.i
43 br label %bb134.i
44
45 bb21.i: ; preds = %bb2.i
46 %1 = call i32 @strcmp(i8* undef, i8* getelementptr inbounds ([6 x i8]* @.str31, i32 0, i32 0)) nounwind readonly ; [#uses=0]
47 br i1 undef, label %bb30.i, label %bb31.i
48
49 bb30.i: ; preds = %bb21.i
50 br label %bb134.i
51
52 bb31.i: ; preds = %bb21.i
53 br i1 undef, label %bb41.i, label %bb44.i
54
55 bb41.i: ; preds = %bb31.i
56 %2 = icmp slt i32 undef, %argc ; [#uses=1]
57 br i1 %2, label %bb1.i77.i, label %bb2.i78.i
58
59 bb1.i77.i: ; preds = %bb41.i
60 %3 = load float* undef, align 4 ; [#uses=2]
61 %4 = fcmp ugt float %3, 0.000000e+00 ; [#uses=1]
62 br i1 %4, label %bb43.i, label %bb42.i
63
64 bb2.i78.i: ; preds = %bb41.i
65 unreachable
66
67 bb42.i: ; preds = %bb1.i77.i
68 unreachable
69
70 bb43.i: ; preds = %bb1.i77.i
71 br label %bb134.i
72
73 bb44.i: ; preds = %bb31.i
74 br i1 undef, label %bb45.i, label %bb49.i
75
76 bb45.i: ; preds = %bb44.i
77 %5 = icmp slt i32 undef, %argc ; [#uses=1]
78 br i1 %5, label %bb1.i72.i, label %bb2.i73.i
79
80 bb1.i72.i: ; preds = %bb45.i
81 %6 = load float* undef, align 4 ; [#uses=3]
82 %7 = fcmp ult float %6, 1.000000e+00 ; [#uses=1]
83 %or.cond.i = and i1 undef, %7 ; [#uses=1]
84 br i1 %or.cond.i, label %bb48.i, label %bb47.i
85
86 bb2.i73.i: ; preds = %bb45.i
87 unreachable
88
89 bb47.i: ; preds = %bb1.i72.i
90 unreachable
91
92 bb48.i: ; preds = %bb1.i72.i
93 br label %bb134.i
94
95 bb49.i: ; preds = %bb44.i
96 br i1 undef, label %bb50.i, label %bb53.i
97
98 bb50.i: ; preds = %bb49.i
99 br i1 false, label %bb1.i67.i, label %bb2.i68.i
100
101 bb1.i67.i: ; preds = %bb50.i
102 br i1 false, label %read_float_option.exit69.i, label %bb1.i67.bb2.i68_crit_edge.i
103
104 bb1.i67.bb2.i68_crit_edge.i: ; preds = %bb1.i67.i
105 br label %bb2.i68.i
106
107 bb2.i68.i: ; preds = %bb1.i67.bb2.i68_crit_edge.i, %bb50.i
108 unreachable
109
110 read_float_option.exit69.i: ; preds = %bb1.i67.i
111 br i1 undef, label %bb52.i, label %bb51.i
112
113 bb51.i: ; preds = %read_float_option.exit69.i
114 unreachable
115
116 bb52.i: ; preds = %read_float_option.exit69.i
117 br label %bb134.i
118
119 bb53.i: ; preds = %bb49.i
120 %8 = call i32 @strcmp(i8* undef, i8* getelementptr inbounds ([21 x i8]* @.str61, i32 0, i32 0)) nounwind readonly ; [#uses=0]
121 br i1 false, label %bb89.i, label %bb92.i
122
123 bb89.i: ; preds = %bb53.i
124 br i1 undef, label %bb1.i27.i, label %bb2.i28.i
125
126 bb1.i27.i: ; preds = %bb89.i
127 unreachable
128
129 bb2.i28.i: ; preds = %bb89.i
130 unreachable
131
132 bb92.i: ; preds = %bb53.i
133 br i1 undef, label %bb93.i, label %bb96.i
134
135 bb93.i: ; preds = %bb92.i
136 br i1 undef, label %bb1.i22.i, label %bb2.i23.i
137
138 bb1.i22.i: ; preds = %bb93.i
139 br i1 undef, label %bb95.i, label %bb94.i
140
141 bb2.i23.i: ; preds = %bb93.i
142 unreachable
143
144 bb94.i: ; preds = %bb1.i22.i
145 unreachable
146
147 bb95.i: ; preds = %bb1.i22.i
148 br label %bb134.i
149
150 bb96.i: ; preds = %bb92.i
151 br i1 undef, label %bb97.i, label %bb100.i
152
153 bb97.i: ; preds = %bb96.i
154 %9 = icmp slt i32 undef, %argc ; [#uses=1]
155 br i1 %9, label %bb1.i17.i, label %bb2.i18.i
156
157 bb1.i17.i: ; preds = %bb97.i
158 %10 = call i32 (i8*, i8*, ...)* @"\01_sscanf$LDBL128"(i8* undef, i8* getelementptr inbounds ([3 x i8]* @.str66, i32 0, i32 0), float* undef) nounwind ; [#uses=1]
159 %phitmp.i16.i = icmp eq i32 %10, 1 ; [#uses=1]
160 br i1 %phitmp.i16.i, label %read_float_option.exit19.i, label %bb1.i17.bb2.i18_crit_edge.i
161
162 bb1.i17.bb2.i18_crit_edge.i: ; preds = %bb1.i17.i
163 br label %bb2.i18.i
164
165 bb2.i18.i: ; preds = %bb1.i17.bb2.i18_crit_edge.i, %bb97.i
166 unreachable
167
168 read_float_option.exit19.i: ; preds = %bb1.i17.i
169 br i1 false, label %bb99.i, label %bb98.i
170
171 bb98.i: ; preds = %read_float_option.exit19.i
172 unreachable
173
174 bb99.i: ; preds = %read_float_option.exit19.i
175 br label %bb134.i
176
177 bb100.i: ; preds = %bb96.i
178 br i1 false, label %bb101.i, label %bb104.i
179
180 bb101.i: ; preds = %bb100.i
181 br i1 false, label %bb1.i12.i, label %bb2.i13.i
182
183 bb1.i12.i: ; preds = %bb101.i
184 br i1 undef, label %bb102.i, label %bb103.i
185
186 bb2.i13.i: ; preds = %bb101.i
187 unreachable
188
189 bb102.i: ; preds = %bb1.i12.i
190 unreachable
191
192 bb103.i: ; preds = %bb1.i12.i
193 br label %bb134.i
194
195 bb104.i: ; preds = %bb100.i
196 unreachable
197
198 bb134.i: ; preds = %bb103.i, %bb99.i, %bb95.i, %bb52.i, %bb48.i, %bb43.i, %bb30.i, %bb20.i, %bb1.i
199 %annealing_sched.1.0 = phi float [ 1.000000e+01, %bb1.i ], [ %annealing_sched.1.0, %bb20.i ], [ 1.000000e+00, %bb30.i ], [ %annealing_sched.1.0, %bb43.i ], [ %annealing_sched.1.0, %bb48.i ], [ %annealing_sched.1.0, %bb52.i ], [ %annealing_sched.1.0, %bb95.i ], [ %annealing_sched.1.0, %bb99.i ], [ %annealing_sched.1.0, %bb103.i ] ; [#uses=8]
200 %annealing_sched.2.0 = phi float [ 1.000000e+02, %bb1.i ], [ %annealing_sched.2.0, %bb20.i ], [ %annealing_sched.2.0, %bb30.i ], [ %3, %bb43.i ], [ %annealing_sched.2.0, %bb48.i ], [ %annealing_sched.2.0, %bb52.i ], [ %annealing_sched.2.0, %bb95.i ], [ %annealing_sched.2.0, %bb99.i ], [ %annealing_sched.2.0, %bb103.i ] ; [#uses=8]
201 %annealing_sched.3.0 = phi float [ 0x3FE99999A0000000, %bb1.i ], [ %annealing_sched.3.0, %bb20.i ], [ %annealing_sched.3.0, %bb30.i ], [ %annealing_sched.3.0, %bb43.i ], [ %6, %bb48.i ], [ %annealing_sched.3.0, %bb52.i ], [ %annealing_sched.3.0, %bb95.i ], [ %annealing_sched.3.0, %bb99.i ], [ %annealing_sched.3.0, %bb103.i ] ; [#uses=8]
202 %annealing_sched.4.0 = phi float [ 0x3F847AE140000000, %bb1.i ], [ %annealing_sched.4.0, %bb20.i ], [ %annealing_sched.4.0, %bb30.i ], [ %annealing_sched.4.0, %bb43.i ], [ %annealing_sched.4.0, %bb48.i ], [ 0.000000e+00, %bb52.i ], [ %annealing_sched.4.0, %bb95.i ], [ %annealing_sched.4.0, %bb99.i ], [ %annealing_sched.4.0, %bb103.i ] ; [#uses=8]
203 %router_opts.0.0 = phi float [ 0.000000e+00, %bb1.i ], [ %router_opts.0.0, %bb20.i ], [ 1.000000e+04, %bb30.i ], [ %router_opts.0.0, %bb43.i ], [ %router_opts.0.0, %bb48.i ], [ %router_opts.0.0, %bb52.i ], [ %router_opts.0.0, %bb95.i ], [ %router_opts.0.0, %bb99.i ], [ %router_opts.0.0, %bb103.i ] ; [#uses=8]
204 %router_opts.1.0 = phi float [ 5.000000e-01, %bb1.i ], [ %router_opts.1.0, %bb20.i ], [ 1.000000e+04, %bb30.i ], [ %router_opts.1.0, %bb43.i ], [ %router_opts.1.0, %bb48.i ], [ %router_opts.1.0, %bb52.i ], [ undef, %bb95.i ], [ %router_opts.1.0, %bb99.i ], [ %router_opts.1.0, %bb103.i ] ; [#uses=7]
205 %router_opts.2.0 = phi float [ 1.500000e+00, %bb1.i ], [ %router_opts.2.0, %bb20.i ], [ %router_opts.2.0, %bb30.i ], [ %router_opts.2.0, %bb43.i ], [ %router_opts.2.0, %bb48.i ], [ %router_opts.2.0, %bb52.i ], [ %router_opts.2.0, %bb95.i ], [ undef, %bb99.i ], [ %router_opts.2.0, %bb103.i ] ; [#uses=8]
206 %router_opts.3.0 = phi float [ 0x3FC99999A0000000, %bb1.i ], [ %router_opts.3.0, %bb20.i ], [ %router_opts.3.0, %bb30.i ], [ %router_opts.3.0, %bb43.i ], [ %router_opts.3.0, %bb48.i ], [ %router_opts.3.0, %bb52.i ], [ %router_opts.3.0, %bb95.i ], [ %router_opts.3.0, %bb99.i ], [ 0.000000e+00, %bb103.i ] ; [#uses=8]
207 %11 = phi float [ 0x3FC99999A0000000, %bb1.i ], [ %11, %bb20.i ], [ %11, %bb30.i ], [ %11, %bb43.i ], [ %11, %bb48.i ], [ %11, %bb52.i ], [ %11, %bb95.i ], [ %11, %bb99.i ], [ 0.000000e+00, %bb103.i ] ; [#uses=8]
208 %12 = phi float [ 1.500000e+00, %bb1.i ], [ %12, %bb20.i ], [ %12, %bb30.i ], [ %12, %bb43.i ], [ %12, %bb48.i ], [ %12, %bb52.i ], [ %12, %bb95.i ], [ undef, %bb99.i ], [ %12, %bb103.i ] ; [#uses=8]
209 %13 = phi float [ 5.000000e-01, %bb1.i ], [ %13, %bb20.i ], [ 1.000000e+04, %bb30.i ], [ %13, %bb43.i ], [ %13, %bb48.i ], [ %13, %bb52.i ], [ undef, %bb95.i ], [ %13, %bb99.i ], [ %13, %bb103.i ] ; [#uses=7]
210 %14 = phi float [ 0.000000e+00, %bb1.i ], [ %14, %bb20.i ], [ 1.000000e+04, %bb30.i ], [ %14, %bb43.i ], [ %14, %bb48.i ], [ %14, %bb52.i ], [ %14, %bb95.i ], [ %14, %bb99.i ], [ %14, %bb103.i ] ; [#uses=8]
211 %15 = phi float [ 0x3FE99999A0000000, %bb1.i ], [ %15, %bb20.i ], [ %15, %bb30.i ], [ %15, %bb43.i ], [ %6, %bb48.i ], [ %15, %bb52.i ], [ %15, %bb95.i ], [ %15, %bb99.i ], [ %15, %bb103.i ] ; [#uses=8]
212 %16 = phi float [ 0x3F847AE140000000, %bb1.i ], [ %16, %bb20.i ], [ %16, %bb30.i ], [ %16, %bb43.i ], [ %16, %bb48.i ], [ 0.000000e+00, %bb52.i ], [ %16, %bb95.i ], [ %16, %bb99.i ], [ %16, %bb103.i ] ; [#uses=8]
213 %17 = phi float [ 1.000000e+01, %bb1.i ], [ %17, %bb20.i ], [ 1.000000e+00, %bb30.i ], [ %17, %bb43.i ], [ %17, %bb48.i ], [ %17, %bb52.i ], [ %17, %bb95.i ], [ %17, %bb99.i ], [ %17, %bb103.i ] ; [#uses=8]
214 %18 = icmp slt i32 undef, %argc ; [#uses=1]
215 br i1 %18, label %bb2.i, label %bb135.i
216
217 bb135.i: ; preds = %bb134.i
218 br i1 undef, label %bb141.i, label %bb142.i
219
220 bb141.i: ; preds = %bb135.i
221 unreachable
222
223 bb142.i: ; preds = %bb135.i
224 br i1 undef, label %bb145.i, label %bb144.i
225
226 bb144.i: ; preds = %bb142.i
227 unreachable
228
229 bb145.i: ; preds = %bb142.i
230 br i1 undef, label %bb146.i, label %bb147.i
231
232 bb146.i: ; preds = %bb145.i
233 unreachable
234
235 bb147.i: ; preds = %bb145.i
236 br i1 undef, label %bb148.i, label %bb155.i
237
238 bb148.i: ; preds = %bb147.i
239 br label %bb155.i
240
241 bb155.i: ; preds = %bb148.i, %bb147.i
242 br i1 undef, label %bb156.i, label %bb161.i
243
244 bb156.i: ; preds = %bb155.i
245 unreachable
246
247 bb161.i: ; preds = %bb155.i
248 br i1 undef, label %bb162.i, label %bb163.i
249
250 bb162.i: ; preds = %bb161.i
251 %19 = fpext float %17 to double ; [#uses=1]
252 %20 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([61 x i8]* @.str101, i32 0, i32 0), double %19) nounwind ; [#uses=0]
253 unreachable
254
255 bb163.i: ; preds = %bb161.i
256 %21 = fpext float %16 to double ; [#uses=1]
257 %22 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([31 x i8]* @.str104, i32 0, i32 0), double %21) nounwind ; [#uses=0]
258 %23 = fpext float %15 to double ; [#uses=1]
259 %24 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([45 x i8]* @.str105, i32 0, i32 0), double %23) nounwind ; [#uses=0]
260 %25 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([38 x i8]* @.str112, i32 0, i32 0), double undef) nounwind ; [#uses=0]
261 br i1 undef, label %parse_command.exit, label %bb176.i
262
263 bb176.i: ; preds = %bb163.i
264 br i1 undef, label %bb177.i, label %bb178.i
265
266 bb177.i: ; preds = %bb176.i
267 unreachable
268
269 bb178.i: ; preds = %bb176.i
270 %26 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([36 x i8]* @.str121, i32 0, i32 0), double undef) nounwind ; [#uses=0]
271 %27 = fpext float %14 to double ; [#uses=1]
272 %28 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([67 x i8]* @.str12293, i32 0, i32 0), double %27) nounwind ; [#uses=0]
273 %29 = fpext float %13 to double ; [#uses=1]
274 %30 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([68 x i8]* @.str123, i32 0, i32 0), double %29) nounwind ; [#uses=0]
275 %31 = fpext float %12 to double ; [#uses=1]
276 %32 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([52 x i8]* @.str124, i32 0, i32 0), double %31) nounwind ; [#uses=0]
277 %33 = fpext float %11 to double ; [#uses=1]
278 %34 = call i32 (i8*, ...)* @"\01_printf$LDBL128"(i8* getelementptr inbounds ([51 x i8]* @.str125, i32 0, i32 0), double %33) nounwind ; [#uses=0]
279 unreachable
280
281 parse_command.exit: ; preds = %bb163.i
282 br i1 undef, label %bb4.i152.i, label %my_fopen.exit.i
283
284 bb4.i152.i: ; preds = %parse_command.exit
285 unreachable
286
287 my_fopen.exit.i: ; preds = %parse_command.exit
288 br i1 undef, label %bb.i6.i99, label %bb49.preheader.i.i
289
290 bb.i6.i99: ; preds = %my_fopen.exit.i
291 br i1 undef, label %bb3.i.i100, label %bb1.i8.i
292
293 bb1.i8.i: ; preds = %bb.i6.i99
294 unreachable
295
296 bb3.i.i100: ; preds = %bb.i6.i99
297 unreachable
298
299 bb49.preheader.i.i: ; preds = %my_fopen.exit.i
300 br i1 undef, label %bb7.i11.i, label %bb50.i.i
301
302 bb7.i11.i: ; preds = %bb49.preheader.i.i
303 unreachable
304
305 bb50.i.i: ; preds = %bb49.preheader.i.i
306 br i1 undef, label %bb.i.i.i20.i, label %my_calloc.exit.i.i.i
307
308 bb.i.i.i20.i: ; preds = %bb50.i.i
309 unreachable
310
311 my_calloc.exit.i.i.i: ; preds = %bb50.i.i
312 br i1 undef, label %bb.i.i37.i.i, label %alloc_hash_table.exit.i21.i
313
314 bb.i.i37.i.i: ; preds = %my_calloc.exit.i.i.i
315 unreachable
316
317 alloc_hash_table.exit.i21.i: ; preds = %my_calloc.exit.i.i.i
318 br i1 undef, label %bb51.i.i, label %bb3.i23.i.i
319
320 bb51.i.i: ; preds = %alloc_hash_table.exit.i21.i
321 unreachable
322
323 bb3.i23.i.i: ; preds = %alloc_hash_table.exit.i21.i
324 br i1 undef, label %bb.i8.i.i, label %bb.nph.i.i
325
326 bb.nph.i.i: ; preds = %bb3.i23.i.i
327 unreachable
328
329 bb.i8.i.i: ; preds = %bb3.i.i34.i, %bb3.i23.i.i
330 br i1 undef, label %bb3.i.i34.i, label %bb1.i.i32.i
331
332 bb1.i.i32.i: ; preds = %bb.i8.i.i
333 unreachable
334
335 bb3.i.i34.i: ; preds = %bb.i8.i.i
336 br i1 undef, label %free_hash_table.exit.i.i, label %bb.i8.i.i
337
338 free_hash_table.exit.i.i: ; preds = %bb3.i.i34.i
339 br i1 undef, label %check_netlist.exit.i, label %bb59.i.i
340
341 bb59.i.i: ; preds = %free_hash_table.exit.i.i
342 unreachable
343
344 check_netlist.exit.i: ; preds = %free_hash_table.exit.i.i
345 br label %bb.i.i3.i
346
347 bb.i.i3.i: ; preds = %bb3.i.i4.i, %check_netlist.exit.i
348 br i1 false, label %bb3.i.i4.i, label %bb1.i.i.i122
349
350 bb1.i.i.i122: ; preds = %bb1.i.i.i122, %bb.i.i3.i
351 br i1 false, label %bb3.i.i4.i, label %bb1.i.i.i122
352
353 bb3.i.i4.i: ; preds = %bb1.i.i.i122, %bb.i.i3.i
354 br i1 undef, label %read_net.exit, label %bb.i.i3.i
355
356 read_net.exit: ; preds = %bb3.i.i4.i
357 br i1 undef, label %bb.i44, label %bb3.i47
358
359 bb.i44: ; preds = %read_net.exit
360 unreachable
361
362 bb3.i47: ; preds = %read_net.exit
363 br i1 false, label %bb9.i50, label %bb8.i49
364
365 bb8.i49: ; preds = %bb3.i47
366 unreachable
367
368 bb9.i50: ; preds = %bb3.i47
369 br i1 undef, label %bb11.i51, label %bb12.i52
370
371 bb11.i51: ; preds = %bb9.i50
372 unreachable
373
374 bb12.i52: ; preds = %bb9.i50
375 br i1 undef, label %bb.i.i53, label %my_malloc.exit.i54
376
377 bb.i.i53: ; preds = %bb12.i52
378 unreachable
379
380 my_malloc.exit.i54: ; preds = %bb12.i52
381 br i1 undef, label %bb.i2.i55, label %my_malloc.exit3.i56
382
383 bb.i2.i55: ; preds = %my_malloc.exit.i54
384 unreachable
385
386 my_malloc.exit3.i56: ; preds = %my_malloc.exit.i54
387 br i1 undef, label %bb.i.i.i57, label %my_malloc.exit.i.i
388
389 bb.i.i.i57: ; preds = %my_malloc.exit3.i56
390 unreachable
391
392 my_malloc.exit.i.i: ; preds = %my_malloc.exit3.i56
393 br i1 undef, label %bb, label %bb10
394
395 bb: ; preds = %my_malloc.exit.i.i
396 unreachable
397
398 bb10: ; preds = %my_malloc.exit.i.i
399 br i1 false, label %bb12, label %bb11
400
401 bb11: ; preds = %bb10
402 unreachable
403
404 bb12: ; preds = %bb10
405 store float %annealing_sched.1.0, float* null, align 4
406 store float %annealing_sched.2.0, float* undef, align 8
407 store float %annealing_sched.3.0, float* undef, align 4
408 store float %annealing_sched.4.0, float* undef, align 8
409 store float %router_opts.0.0, float* undef, align 8
410 store float %router_opts.1.0, float* undef, align 4
411 store float %router_opts.2.0, float* null, align 8
412 store float %router_opts.3.0, float* undef, align 4
413 br i1 undef, label %place_and_route.exit, label %bb7.i22
414
415 bb7.i22: ; preds = %bb12
416 br i1 false, label %bb8.i23, label %bb9.i26
417
418 bb8.i23: ; preds = %bb7.i22
419 unreachable
420
421 bb9.i26: ; preds = %bb7.i22
422 unreachable
423
424 place_and_route.exit: ; preds = %bb12
425 unreachable
426 }
427
428 declare i32 @"\01_printf$LDBL128"(i8*, ...) nounwind
429
430 declare i32 @strcmp(i8* nocapture, i8* nocapture) nounwind readonly
431
432 declare i32 @"\01_sscanf$LDBL128"(i8*, i8*, ...) nounwind
1818 br i1 %tmp35, label %bb38, label %bb87.preheader
1919 bb38: ; preds = %bb33
2020 %tmp53 = add i32 %tmp19, %delta ; [#uses=2]
21 br i1 false, label %bb50, label %bb43
21 br label %bb43
2222 bb43: ; preds = %bb38
2323 store i32 %tmp53, i32* null, align 4
2424 ret void
99 define fastcc %struct.tree_node* @pushdecl(%struct.tree_node* %x) nounwind {
1010 entry:
1111 %tmp3.i40 = icmp eq %struct.binding_level* null, null ; [#uses=2]
12 br i1 false, label %bb143, label %bb140
12 br label %bb140
1313 bb140: ; preds = %entry
1414 br i1 %tmp3.i40, label %bb160, label %bb17.i
1515 bb17.i: ; preds = %bb140
66
77 define double @_Z7qstrtodPKcPS0_Pb(i8* %s00, i8** %se, i8* %ok) nounwind {
88 entry:
9 br i1 false, label %bb151, label %bb163
9 br label %bb163
1010
1111 bb151: ; preds = %entry
1212 br label %bb163
1818 br label %bb5.i
1919
2020 bb5.i: ; preds = %bb5.i57.i, %bb163
21 %b.0.i = phi %struct.Bigint* [ null, %bb163 ], [ %tmp9.i.i41.i, %bb5.i57.i ] ; <%struct.Bigint*> [#uses=1]
21 %b.0.i = phi %struct.Bigint* [ null, %bb163 ] ; <%struct.Bigint*> [#uses=1]
2222 %tmp3.i7.i728 = load i32* null, align 4 ; [#uses=1]
2323 br label %bb.i27.i
2424
2525 bb.i27.i: ; preds = %bb.i27.i, %bb5.i
2626 %tmp23.i20.i = lshr i32 0, 16 ; [#uses=1]
27 br i1 false, label %bb.i27.i, label %bb5.i57.i
27 br label %bb5.i57.i
2828
2929 bb5.i57.i: ; preds = %bb.i27.i
3030 %tmp50.i35.i = load i32* null, align 4 ; [#uses=1]
4040 store i32 %tmp23.i20.i, i32* null, align 4
4141 %tmp74.i61.i = add i32 %tmp3.i7.i728, 1 ; [#uses=1]
4242 store i32 %tmp74.i61.i, i32* null, align 4
43 br i1 false, label %bb5.i, label %bb7.i
43 br label %bb7.i
4444
4545 bb7.i: ; preds = %bb5.i57.i
4646 %tmp514 = load i32* null, align 4 ; [#uses=1]
+0
-84
test/CodeGen/X86/2009-01-12-CoalescerBug.ll less more
None ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | grep movq | count 2
1 ; PR3311
2
3 %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
4 %struct.VEC_basic_block_base = type { i32, i32, [1 x %struct.basic_block_def*] }
5 %struct.VEC_basic_block_gc = type { %struct.VEC_basic_block_base }
6 %struct.VEC_edge_base = type { i32, i32, [1 x %struct.edge_def*] }
7 %struct.VEC_edge_gc = type { %struct.VEC_edge_base }
8 %struct.VEC_rtx_base = type { i32, i32, [1 x %struct.rtx_def*] }
9 %struct.VEC_rtx_gc = type { %struct.VEC_rtx_base }
10 %struct.VEC_temp_slot_p_base = type { i32, i32, [1 x %struct.temp_slot*] }
11 %struct.VEC_temp_slot_p_gc = type { %struct.VEC_temp_slot_p_base }
12 %struct.VEC_tree_base = type { i32, i32, [1 x %struct.tree_node*] }
13 %struct.VEC_tree_gc = type { %struct.VEC_tree_base }
14 %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] }
15 %struct.basic_block_def = type { %struct.tree_node*, %struct.VEC_edge_gc*, %struct.VEC_edge_gc*, i8*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_il_dependent, %struct.tree_node*, %struct.edge_prediction*, i64, i32, i32, i32, i32 }
16 %struct.basic_block_il_dependent = type { %struct.rtl_bb_info* }
17 %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [2 x i64] }
18 %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* }
19 %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack }
20 %struct.block_symbol = type { [3 x %struct.rtunion], %struct.object_block*, i64 }
21 %struct.c_arg_info = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i8 }
22 %struct.c_language_function = type { %struct.stmt_tree_s }
23 %struct.c_switch = type opaque
24 %struct.control_flow_graph = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.VEC_basic_block_gc*, i32, i32, i32, %struct.VEC_basic_block_gc*, i32 }
25 %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.location_t*, i32, i32, i64, i32 }
26 %struct.edge_def_insns = type { %struct.rtx_def* }
27 %struct.edge_prediction = type opaque
28 %struct.eh_status = type opaque
29 %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** }
30 %struct.et_node = type opaque
31 %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* }
32 %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.control_flow_graph*, %struct.tree_node*, %struct.function*, i32, i32, i32, i32, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i8, i32, i64, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.VEC_temp_slot_p_gc*, %struct.temp_slot*, %struct.var_refs_queue*, i32, i32, i32, i32, %struct.machine_function*, i32, i32, %struct.language_function*, %struct.htab*, %struct.rtx_def*, i32, i32, i32, %struct.location_t, %struct.VEC_tree_gc*, %struct.tree_node*, i8*, i8*, i8*, i8*, i8*, %struct.tree_node*, i8, i8, i8, i8, i8, i8 }
33 %struct.htab = type { i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*, i8**, i64, i64, i64, i32, i32, i8* (i64, i64)*, void (i8*)*, i8*, i8* (i8*, i64, i64)*, void (i8*, i8*)*, i32 }
34 %struct.initial_value_struct = type opaque
35 %struct.lang_decl = type { i8 }
36 %struct.language_function = type { %struct.c_language_function, %struct.tree_node*, %struct.tree_node*, %struct.c_switch*, %struct.c_arg_info*, i32, i32, i32, i32 }
37 %struct.location_t = type { i8*, i32 }
38 %struct.loop = type opaque
39 %struct.machine_function = type { %struct.stack_local_entry*, i8*, %struct.rtx_def*, i32, i32, [4 x i32], i32, i32, i32 }
40 %struct.object_block = type { %struct.section*, i32, i64, %struct.VEC_rtx_gc*, %struct.VEC_rtx_gc* }
41 %struct.obstack = type { i64, %struct._obstack_chunk*, i8*, i8*, i8*, i64, i32, %struct._obstack_chunk* (i8*, i64)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 }
42 %struct.omp_clause_subcode = type { i32 }
43 %struct.rtl_bb_info = type { %struct.rtx_def*, %struct.rtx_def*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, %struct.rtx_def*, %struct.rtx_def*, i32 }
44 %struct.rtunion = type { i8* }
45 %struct.rtx_def = type { i16, i8, i8, %struct.u }
46 %struct.section = type { %struct.unnamed_section }
47 %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* }
48 %struct.stack_local_entry = type opaque
49 %struct.stmt_tree_s = type { %struct.tree_node*, i32 }
50 %struct.temp_slot = type opaque
51 %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %union.tree_ann_d*, i8, i8, i8, i8, i8 }
52 %struct.tree_decl_common = type { %struct.tree_decl_minimal, %struct.tree_node*, i8, i8, i8, i8, i8, i32, i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* }
53 %struct.tree_decl_minimal = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, %struct.tree_node* }
54 %struct.tree_decl_non_common = type { %struct.tree_decl_with_vis, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* }
55 %struct.tree_decl_with_rtl = type { %struct.tree_decl_common, %struct.rtx_def*, i32 }
56 %struct.tree_decl_with_vis = type { %struct.tree_decl_with_rtl, %struct.tree_node*, %struct.tree_node*, i8, i8, i8, i8 }
57 %struct.tree_function_decl = type { %struct.tree_decl_non_common, i32, i8, i8, i64, %struct.function* }
58 %struct.tree_node = type { %struct.tree_function_decl }
59 %struct.u = type { %struct.block_symbol }
60 %struct.unnamed_section = type { %struct.omp_clause_subcode, void (i8*)*, i8*, %struct.section* }
61 %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* }
62 %struct.varasm_status = type opaque
63 %union.tree_ann_d = type opaque
64 @.str1 = external constant [31 x i8] ; <[31 x i8]*> [#uses=1]
65 @integer_types = external global [11 x %struct.tree_node*] ; <[11 x %struct.tree_node*]*> [#uses=1]
66 @__FUNCTION__.31164 = external constant [23 x i8], align 16 ; <[23 x i8]*> [#uses=1]
67 @llvm.used = appending global [1 x i8*] [ i8* bitcast (i32 (i32, i32)* @c_common_type_for_size to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
68
69 define i32 @c_common_type_for_size(i32 %bits, i32 %unsignedp) nounwind {
70 entry:
71 %0 = load %struct.tree_node** getelementptr ([11 x %struct.tree_node*]* @integer_types, i32 0, i64 5), align 8 ; <%struct.tree_node*> [#uses=1]
72 br i1 false, label %bb16, label %bb
73
74 bb: ; preds = %entry
75 tail call void @tree_class_check_failed(%struct.tree_node* %0, i32 2, i8* getelementptr ([31 x i8]* @.str1, i32 0, i64 0), i32 1785, i8* getelementptr ([23 x i8]* @__FUNCTION__.31164, i32 0, i32 0)) noreturn nounwind
76 unreachable
77
78 bb16: ; preds = %entry
79 %tmp = add i32 %bits, %unsignedp ; [#uses=1]
80 ret i32 %tmp
81 }
82
83 declare void @tree_class_check_failed(%struct.tree_node*, i32, i8*, i32, i8*) noreturn
+0
-47
test/CodeGen/X86/2009-09-07-CoalescerBug.ll less more
None ; RUN: llc < %s -mtriple=x86_64-unknown-freebsd7.2 -code-model=kernel | FileCheck %s
1 ; PR4689
2
3 %struct.__s = type { [8 x i8] }
4 %struct.pcb = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i16, i8* }
5 %struct.pcpu = type { i32*, i32*, i32*, i32*, %struct.pcb*, i64, i32, i32, i32, i32 }
6
7 define i64 @hammer_time(i64 %modulep, i64 %physfree) nounwind ssp noredzone noimplicitfloat {
8 ; CHECK: hammer_time:
9 ; CHECK: movq $Xrsvd, %rax
10 ; CHECK: movq $Xrsvd, %rcx
11 entry:
12 br i1 undef, label %if.then, label %if.end
13
14 if.then: ; preds = %entry
15 br label %if.end
16
17 if.end: ; preds = %if.then, %entry
18 br label %for.body
19
20 for.body: ; preds = %for.inc, %if.end
21 switch i32 undef, label %if.then76 [
22 i32 9, label %for.inc
23 i32 10, label %for.inc
24 i32 11, label %for.inc
25 i32 12, label %for.inc
26 ]
27
28 if.then76: ; preds = %for.body
29 unreachable
30
31 for.inc: ; preds = %for.body, %for.body, %for.body, %for.body
32 br i1 undef, label %for.end, label %for.body
33
34 for.end: ; preds = %for.inc
35 call void asm sideeffect "mov $1,%gs:$0", "=*m,r,~{dirflag},~{fpsr},~{flags}"(%struct.__s* bitcast (%struct.pcb** getelementptr (%struct.pcpu* null, i32 0, i32 4) to %struct.__s*), i64 undef) nounwind
36 br label %for.body170
37
38 for.body170: ; preds = %for.body170, %for.end
39 store i64 or (i64 and (i64 or (i64 ptrtoint (void (i32, i32, i32, i32)* @Xrsvd to i64), i64 2097152), i64 2162687), i64 or (i64 or (i64 and (i64 shl (i64 ptrtoint (void (i32, i32, i32, i32)* @Xrsvd to i64), i64 32), i64 -281474976710656), i64 140737488355328), i64 15393162788864)), i64* undef
40 br i1 undef, label %for.end175, label %for.body170
41
42 for.end175: ; preds = %for.body170
43 unreachable
44 }
45
46 declare void @Xrsvd(i32, i32, i32, i32) ssp noredzone noimplicitfloat
+0
-29
test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll less more
None ; RUN: llc < %s -mtriple=i386-apple-darwin10 -post-RA-scheduler=true | FileCheck %s
1
2 ; PR4958
3
4 define i32 @main() nounwind ssp {
5 entry:
6 ; CHECK: main:
7 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
8 br label %bb
9
10 bb: ; preds = %bb1, %entry
11 ; CHECK: addl $1
12 ; CHECK-NEXT: movl %e
13 ; CHECK-NEXT: adcl $0
14 %i.0 = phi i64 [ 0, %entry ], [ %0, %bb1 ] ; [#uses=1]
15 %0 = add nsw i64 %i.0, 1 ; [#uses=2]
16 %1 = icmp sgt i32 0, 0 ; [#uses=1]
17 br i1 %1, label %bb2, label %bb1
18
19 bb1: ; preds = %bb
20 %2 = icmp sle i64 %0, 1 ; [#uses=1]
21 br i1 %2, label %bb, label %bb2
22
23 bb2: ; preds = %bb1, %bb
24 br label %return
25
26 return: ; preds = %bb2
27 ret i32 0
28 }
+0
-40
test/CodeGen/X86/2009-12-12-CoalescerBug.ll less more
None ; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
1
2 define i32 @do_loop(i32* nocapture %sdp, i32* nocapture %ddp, i8* %mdp, i8* nocapture %cdp, i32 %w) nounwind readonly optsize ssp {
3 entry:
4 br label %bb
5
6 bb: ; preds = %bb5, %entry
7 %mask.1.in = load i8* undef, align 1 ; [#uses=3]
8 %0 = icmp eq i8 %mask.1.in, 0 ; [#uses=1]
9 br i1 %0, label %bb5, label %bb1
10
11 bb1: ; preds = %bb
12 br i1 undef, label %bb2, label %bb3
13
14 bb2: ; preds = %bb1
15 ; CHECK: %bb2
16 ; CHECK: movb %ch, %al
17 %1 = zext i8 %mask.1.in to i32 ; [#uses=1]
18 %2 = zext i8 undef to i32 ; [#uses=1]
19 %3 = mul i32 %2, %1 ; [#uses=1]
20 %4 = add i32 %3, 1 ; [#uses=1]
21 %5 = add i32 %4, 0 ; [#uses=1]
22 %6 = lshr i32 %5, 8 ; [#uses=1]
23 %retval12.i = trunc i32 %6 to i8 ; [#uses=1]
24 br label %bb3
25
26 bb3: ; preds = %bb2, %bb1
27 %mask.0.in = phi i8 [ %retval12.i, %bb2 ], [ %mask.1.in, %bb1 ] ; [#uses=1]
28 %7 = icmp eq i8 %mask.0.in, 0 ; [#uses=1]
29 br i1 %7, label %bb5, label %bb4
30
31 bb4: ; preds = %bb3
32 br label %bb5
33
34 bb5: ; preds = %bb4, %bb3, %bb
35 br i1 undef, label %bb6, label %bb
36
37 bb6: ; preds = %bb5
38 ret i32 undef
39 }
11
22 define fastcc i32 @decodeMP3(i32 %isize, i32* %done) nounwind {
33 entry:
4 br i1 false, label %cond_next191, label %cond_true189
4 br label %cond_true189
55
66 cond_true189: ; preds = %entry
77 ret i32 0
88
99 cond_next191: ; preds = %entry
10 br i1 false, label %cond_next37.i, label %cond_false.i9
10 br label %cond_false.i9
1111
1212 cond_false.i9: ; preds = %cond_next191
1313 ret i32 0
1414
1515 cond_next37.i: ; preds = %cond_next191
16 br i1 false, label %cond_false50.i, label %cond_true44.i
16 br label %cond_true44.i
1717
1818 cond_true44.i: ; preds = %cond_next37.i
19 br i1 false, label %cond_true11.i.i, label %bb414.preheader.i
19 br label %bb414.preheader.i
2020
2121 cond_true11.i.i: ; preds = %cond_true44.i
2222 ret i32 0
2525 ret i32 0
2626
2727 bb414.preheader.i: ; preds = %cond_true44.i
28 br i1 false, label %bb.i18, label %do_layer3.exit
28 br label %do_layer3.exit
2929
3030 bb.i18: ; preds = %bb414.preheader.i
31 br i1 false, label %bb358.i, label %cond_true79.i
31 br label %cond_true79.i
3232
3333 cond_true79.i: ; preds = %bb.i18
3434 ret i32 0
3535
3636 bb331.i: ; preds = %bb358.i, %cond_true.i149.i
37 br i1 false, label %cond_true.i149.i, label %cond_false.i151.i
37 br label %cond_false.i151.i
3838
3939 cond_true.i149.i: ; preds = %bb331.i
40 br i1 false, label %bb178.preheader.i.i, label %bb331.i
40 br label %bb331.i
4141
4242 cond_false.i151.i: ; preds = %bb331.i
4343 ret i32 0
5555 br label %bb163.i.i
5656
5757 bb358.i: ; preds = %bb.i18
58 br i1 false, label %bb331.i, label %bb406.i
58 br label %bb406.i
5959
6060 bb406.i: ; preds = %bb358.i
6161 ret i32 0