blob: 513599c58bcd630397eee6587074c2a796214a93 [file] [log] [blame]
Dan Gohman318f5052009-03-14 02:35:10 +00001; RUN: llvm-as < %s | llc -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small > %t
2; RUN: grep leal %t | count 33
3; RUN: grep movl %t | count 239
4; RUN: grep addl %t | count 20
5; RUN: grep subl %t | count 14
6; RUN: not grep leaq %t
7; RUN: not grep movq %t
8; RUN: not grep addq %t
9; RUN: not grep subq %t
10; RUN: not grep movabs %t
11; RUN: not grep largecomm %t
12; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
13; RUN: not grep @GOT %t
14; RUN: not grep @GOTOFF %t
15; RUN: not grep @GOTPCREL %t
16; RUN: not grep @GOTPLT %t
17; RUN: not grep @PLT %t
18; RUN: not grep @PLTOFF %t
19; RUN: grep {call \\\*} %t | count 10
20; RUN: not grep %rip %t
21; RUN: llvm-as < %s | llc -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=pic -code-model=small > %t
22; RUN: grep leal %t | count 43
23; RUN: grep movl %t | count 377
24; RUN: grep addl %t | count 179
25; RUN: grep subl %t | count 6
26; RUN: not grep leaq %t
27; RUN: not grep movq %t
28; RUN: not grep addq %t
29; RUN: not grep subq %t
30; RUN: not grep movabs %t
31; RUN: not grep largecomm %t
32; RUN: grep _GLOBAL_OFFSET_TABLE_ %t | count 148
33; RUN: grep @GOT %t | count 207
34; RUN: grep @GOTOFF %t | count 58
35; RUN: not grep @GOTPCREL %t
36; RUN: not grep @GOTPLT %t
37; RUN: grep @PLT %t | count 20
38; RUN: not grep @PLTOFF %t
39; RUN: grep {call \\\*} %t | count 10
40; RUN: not grep {%rip} %t
41; RUN: llvm-as < %s | llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=static -code-model=small > %t
42; RUN: not grep leal %t
43; RUN: grep movl %t | count 91
44; RUN: not grep addl %t
45; RUN: not grep subl %t
Rafael Espindolab2157762009-04-12 23:00:38 +000046; RUN: grep leaq %t | count 70
Dan Gohman318f5052009-03-14 02:35:10 +000047; RUN: grep movq %t | count 56
48; RUN: grep addq %t | count 20
49; RUN: grep subq %t | count 14
50; RUN: not grep movabs %t
51; RUN: not grep largecomm %t
52; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
53; RUN: not grep @GOT %t
54; RUN: not grep @GOTOFF %t
55; RUN: not grep @GOTPCREL %t
56; RUN: not grep @GOTPLT %t
57; RUN: not grep @PLT %t
58; RUN: not grep @PLTOFF %t
59; RUN: grep {call \\\*} %t | count 10
Rafael Espindolab2157762009-04-12 23:00:38 +000060; RUN: grep {%rip} %t | count 139
Dan Gohman318f5052009-03-14 02:35:10 +000061; RUN: llvm-as < %s | llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=pic -code-model=small > %t
62; RUN: not grep leal %t
63; RUN: grep movl %t | count 98
64; RUN: not grep addl %t
65; RUN: not grep subl %t
66; RUN: grep leaq %t | count 59
67; RUN: grep movq %t | count 195
68; RUN: grep addq %t | count 36
69; RUN: grep subq %t | count 11
70; RUN: not grep movabs %t
71; RUN: not grep largecomm %t
72; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
73; RUN: grep @GOT %t | count 149
74; RUN: not grep @GOTOFF %t
75; RUN: grep @GOTPCREL %t | count 149
76; RUN: not grep @GOTPLT %t
77; RUN: grep @PLT %t | count 20
78; RUN: not grep @PLTOFF %t
79; RUN: grep {call \\\*} %t | count 10
80; RUN: grep {%rip} %t | count 207
81
82
83
84; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -march=x86 -relocation-model=static -code-model=small > %t
85; RUN: grep leal %t | count 33
86; RUN: grep movl %t | count 239
87; RUN: grep addl %t | count 20
88; RUN: grep subl %t | count 14
89; RUN: not grep leaq %t
90; RUN: not grep movq %t
91; RUN: not grep addq %t
92; RUN: not grep subq %t
93; RUN: not grep movabs %t
94; RUN: not grep largecomm %t
95; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
96; RUN: not grep @GOT %t
97; RUN: not grep @GOTOFF %t
98; RUN: not grep @GOTPCREL %t
99; RUN: not grep @GOTPLT %t
100; RUN: not grep @PLT %t
101; RUN: not grep @PLTOFF %t
102; RUN: grep {call \\\*} %t | count 10
103; RUN: not grep %rip %t
104; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -march=x86 -relocation-model=dynamic-no-pic -code-model=small > %t
105; RUN: grep leal %t | count 31
106; RUN: grep movl %t | count 312
107; RUN: grep addl %t | count 32
108; RUN: grep subl %t | count 14
109; RUN: not grep leaq %t
110; RUN: not grep movq %t
111; RUN: not grep addq %t
112; RUN: not grep subq %t
113; RUN: not grep movabs %t
114; RUN: not grep largecomm %t
115; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
116; RUN: not grep @GOT %t
117; RUN: not grep @GOTOFF %t
118; RUN: not grep @GOTPCREL %t
119; RUN: not grep @GOTPLT %t
120; RUN: not grep @PLT %t
121; RUN: not grep @PLTOFF %t
122; RUN: grep {call \\\*} %t | count 10
123; RUN: not grep {%rip} %t
124; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -march=x86 -relocation-model=pic -code-model=small > %t
125; RUN: grep leal %t | count 57
126; RUN: grep movl %t | count 292
127; RUN: grep addl %t | count 32
128; RUN: grep subl %t | count 14
129; RUN: not grep leaq %t
130; RUN: not grep movq %t
131; RUN: not grep addq %t
132; RUN: not grep subq %t
133; RUN: not grep movabs %t
134; RUN: not grep largecomm %t
135; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
136; RUN: not grep @GOT %t
137; RUN: not grep @GOTOFF %t
138; RUN: not grep @GOTPCREL %t
139; RUN: not grep @GOTPLT %t
140; RUN: not grep @PLT %t
141; RUN: not grep @PLTOFF %t
142; RUN: grep {call \\\*} %t | count 10
143; RUN: not grep {%rip} %t
Dan Gohman318f5052009-03-14 02:35:10 +0000144; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small > %t
145; RUN: not grep leal %t
146; RUN: grep movl %t | count 95
147; RUN: not grep addl %t
148; RUN: not grep subl %t
149; RUN: grep leaq %t | count 89
150; RUN: grep movq %t | count 142
151; RUN: grep addq %t | count 30
152; RUN: grep subq %t | count 12
153; RUN: not grep movabs %t
154; RUN: not grep largecomm %t
155; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
156; RUN: grep @GOT %t | count 92
157; RUN: not grep @GOTOFF %t
158; RUN: grep @GOTPCREL %t | count 92
159; RUN: not grep @GOTPLT %t
160; RUN: not grep @PLT %t
161; RUN: not grep @PLTOFF %t
162; RUN: grep {call \\\*} %t | count 10
163; RUN: grep {%rip} %t | count 208
164; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small > %t
165; RUN: not grep leal %t
166; RUN: grep movl %t | count 95
167; RUN: not grep addl %t
168; RUN: not grep subl %t
169; RUN: grep leaq %t | count 89
170; RUN: grep movq %t | count 142
171; RUN: grep addq %t | count 30
172; RUN: grep subq %t | count 12
173; RUN: not grep movabs %t
174; RUN: not grep largecomm %t
175; RUN: not grep _GLOBAL_OFFSET_TABLE_ %t
176; RUN: grep @GOT %t | count 92
177; RUN: not grep @GOTOFF %t
178; RUN: grep @GOTPCREL %t | count 92
179; RUN: not grep @GOTPLT %t
180; RUN: not grep @PLT %t
181; RUN: not grep @PLTOFF %t
182; RUN: grep {call \\\*} %t | count 10
183; RUN: grep {%rip} %t | count 208
184
185@src = external global [131072 x i32]
186@dst = external global [131072 x i32]
187@xsrc = external global [32 x i32]
188@xdst = external global [32 x i32]
189@ptr = external global i32*
190@dsrc = global [131072 x i32] zeroinitializer, align 32
191@ddst = global [131072 x i32] zeroinitializer, align 32
192@dptr = global i32* null
193@lsrc = internal global [131072 x i32] zeroinitializer
194@ldst = internal global [131072 x i32] zeroinitializer
195@lptr = internal global i32* null
196@ifunc = external global void ()*
197@difunc = global void ()* null
198@lifunc = internal global void ()* null
199@lxsrc = internal global [32 x i32] zeroinitializer, align 32
200@lxdst = internal global [32 x i32] zeroinitializer, align 32
201@dxsrc = global [32 x i32] zeroinitializer, align 32
202@dxdst = global [32 x i32] zeroinitializer, align 32
203
204define void @foo00() nounwind {
205entry:
206 %0 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 0), align 4
207 store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 0), align 4
208 ret void
209}
210
211define void @fxo00() nounwind {
212entry:
213 %0 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 0), align 4
214 store i32 %0, i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 0), align 4
215 ret void
216}
217
218define void @foo01() nounwind {
219entry:
220 store i32* getelementptr ([131072 x i32]* @dst, i32 0, i32 0), i32** @ptr, align 8
221 ret void
222}
223
224define void @fxo01() nounwind {
225entry:
226 store i32* getelementptr ([32 x i32]* @xdst, i32 0, i32 0), i32** @ptr, align 8
227 ret void
228}
229
230define void @foo02() nounwind {
231entry:
232 %0 = load i32** @ptr, align 8
233 %1 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 0), align 4
234 store i32 %1, i32* %0, align 4
235 ret void
236}
237
238define void @fxo02() nounwind {
239entry:
240 %0 = load i32** @ptr, align 8
241 %1 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 0), align 4
242 store i32 %1, i32* %0, align 4
243 ret void
244}
245
246define void @foo03() nounwind {
247entry:
248 %0 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 0), align 32
249 store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 0), align 32
250 ret void
251}
252
253define void @foo04() nounwind {
254entry:
255 store i32* getelementptr ([131072 x i32]* @ddst, i32 0, i32 0), i32** @dptr, align 8
256 ret void
257}
258
259define void @foo05() nounwind {
260entry:
261 %0 = load i32** @dptr, align 8
262 %1 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 0), align 32
263 store i32 %1, i32* %0, align 4
264 ret void
265}
266
267define void @foo06() nounwind {
268entry:
269 %0 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 0), align 4
270 store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 0), align 4
271 ret void
272}
273
274define void @foo07() nounwind {
275entry:
276 store i32* getelementptr ([131072 x i32]* @ldst, i32 0, i32 0), i32** @lptr, align 8
277 ret void
278}
279
280define void @foo08() nounwind {
281entry:
282 %0 = load i32** @lptr, align 8
283 %1 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 0), align 4
284 store i32 %1, i32* %0, align 4
285 ret void
286}
287
288define void @qux00() nounwind {
289entry:
290 %0 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 16), align 4
291 store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16), align 4
292 ret void
293}
294
295define void @qxx00() nounwind {
296entry:
297 %0 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 16), align 4
298 store i32 %0, i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16), align 4
299 ret void
300}
301
302define void @qux01() nounwind {
303entry:
304 store i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16), i32** @ptr, align 8
305 ret void
306}
307
308define void @qxx01() nounwind {
309entry:
310 store i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16), i32** @ptr, align 8
311 ret void
312}
313
314define void @qux02() nounwind {
315entry:
316 %0 = load i32** @ptr, align 8
317 %1 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 16), align 4
318 %2 = getelementptr i32* %0, i64 16
319 store i32 %1, i32* %2, align 4
320 ret void
321}
322
323define void @qxx02() nounwind {
324entry:
325 %0 = load i32** @ptr, align 8
326 %1 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 16), align 4
327 %2 = getelementptr i32* %0, i64 16
328 store i32 %1, i32* %2, align 4
329 ret void
330}
331
332define void @qux03() nounwind {
333entry:
334 %0 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 16), align 32
335 store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16), align 32
336 ret void
337}
338
339define void @qux04() nounwind {
340entry:
341 store i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16), i32** @dptr, align 8
342 ret void
343}
344
345define void @qux05() nounwind {
346entry:
347 %0 = load i32** @dptr, align 8
348 %1 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 16), align 32
349 %2 = getelementptr i32* %0, i64 16
350 store i32 %1, i32* %2, align 4
351 ret void
352}
353
354define void @qux06() nounwind {
355entry:
356 %0 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 16), align 4
357 store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16), align 4
358 ret void
359}
360
361define void @qux07() nounwind {
362entry:
363 store i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16), i32** @lptr, align 8
364 ret void
365}
366
367define void @qux08() nounwind {
368entry:
369 %0 = load i32** @lptr, align 8
370 %1 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 16), align 4
371 %2 = getelementptr i32* %0, i64 16
372 store i32 %1, i32* %2, align 4
373 ret void
374}
375
376define void @ind00(i64 %i) nounwind {
377entry:
378 %0 = getelementptr [131072 x i32]* @src, i64 0, i64 %i
379 %1 = load i32* %0, align 4
380 %2 = getelementptr [131072 x i32]* @dst, i64 0, i64 %i
381 store i32 %1, i32* %2, align 4
382 ret void
383}
384
385define void @ixd00(i64 %i) nounwind {
386entry:
387 %0 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %i
388 %1 = load i32* %0, align 4
389 %2 = getelementptr [32 x i32]* @xdst, i64 0, i64 %i
390 store i32 %1, i32* %2, align 4
391 ret void
392}
393
394define void @ind01(i64 %i) nounwind {
395entry:
396 %0 = getelementptr [131072 x i32]* @dst, i64 0, i64 %i
397 store i32* %0, i32** @ptr, align 8
398 ret void
399}
400
401define void @ixd01(i64 %i) nounwind {
402entry:
403 %0 = getelementptr [32 x i32]* @xdst, i64 0, i64 %i
404 store i32* %0, i32** @ptr, align 8
405 ret void
406}
407
408define void @ind02(i64 %i) nounwind {
409entry:
410 %0 = load i32** @ptr, align 8
411 %1 = getelementptr [131072 x i32]* @src, i64 0, i64 %i
412 %2 = load i32* %1, align 4
413 %3 = getelementptr i32* %0, i64 %i
414 store i32 %2, i32* %3, align 4
415 ret void
416}
417
418define void @ixd02(i64 %i) nounwind {
419entry:
420 %0 = load i32** @ptr, align 8
421 %1 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %i
422 %2 = load i32* %1, align 4
423 %3 = getelementptr i32* %0, i64 %i
424 store i32 %2, i32* %3, align 4
425 ret void
426}
427
428define void @ind03(i64 %i) nounwind {
429entry:
430 %0 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %i
431 %1 = load i32* %0, align 4
432 %2 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %i
433 store i32 %1, i32* %2, align 4
434 ret void
435}
436
437define void @ind04(i64 %i) nounwind {
438entry:
439 %0 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %i
440 store i32* %0, i32** @dptr, align 8
441 ret void
442}
443
444define void @ind05(i64 %i) nounwind {
445entry:
446 %0 = load i32** @dptr, align 8
447 %1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %i
448 %2 = load i32* %1, align 4
449 %3 = getelementptr i32* %0, i64 %i
450 store i32 %2, i32* %3, align 4
451 ret void
452}
453
454define void @ind06(i64 %i) nounwind {
455entry:
456 %0 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %i
457 %1 = load i32* %0, align 4
458 %2 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %i
459 store i32 %1, i32* %2, align 4
460 ret void
461}
462
463define void @ind07(i64 %i) nounwind {
464entry:
465 %0 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %i
466 store i32* %0, i32** @lptr, align 8
467 ret void
468}
469
470define void @ind08(i64 %i) nounwind {
471entry:
472 %0 = load i32** @lptr, align 8
473 %1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %i
474 %2 = load i32* %1, align 4
475 %3 = getelementptr i32* %0, i64 %i
476 store i32 %2, i32* %3, align 4
477 ret void
478}
479
480define void @off00(i64 %i) nounwind {
481entry:
482 %0 = add i64 %i, 16
483 %1 = getelementptr [131072 x i32]* @src, i64 0, i64 %0
484 %2 = load i32* %1, align 4
485 %3 = getelementptr [131072 x i32]* @dst, i64 0, i64 %0
486 store i32 %2, i32* %3, align 4
487 ret void
488}
489
490define void @oxf00(i64 %i) nounwind {
491entry:
492 %0 = add i64 %i, 16
493 %1 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %0
494 %2 = load i32* %1, align 4
495 %3 = getelementptr [32 x i32]* @xdst, i64 0, i64 %0
496 store i32 %2, i32* %3, align 4
497 ret void
498}
499
500define void @off01(i64 %i) nounwind {
501entry:
502 %.sum = add i64 %i, 16
503 %0 = getelementptr [131072 x i32]* @dst, i64 0, i64 %.sum
504 store i32* %0, i32** @ptr, align 8
505 ret void
506}
507
508define void @oxf01(i64 %i) nounwind {
509entry:
510 %.sum = add i64 %i, 16
511 %0 = getelementptr [32 x i32]* @xdst, i64 0, i64 %.sum
512 store i32* %0, i32** @ptr, align 8
513 ret void
514}
515
516define void @off02(i64 %i) nounwind {
517entry:
518 %0 = load i32** @ptr, align 8
519 %1 = add i64 %i, 16
520 %2 = getelementptr [131072 x i32]* @src, i64 0, i64 %1
521 %3 = load i32* %2, align 4
522 %4 = getelementptr i32* %0, i64 %1
523 store i32 %3, i32* %4, align 4
524 ret void
525}
526
527define void @oxf02(i64 %i) nounwind {
528entry:
529 %0 = load i32** @ptr, align 8
530 %1 = add i64 %i, 16
531 %2 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %1
532 %3 = load i32* %2, align 4
533 %4 = getelementptr i32* %0, i64 %1
534 store i32 %3, i32* %4, align 4
535 ret void
536}
537
538define void @off03(i64 %i) nounwind {
539entry:
540 %0 = add i64 %i, 16
541 %1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %0
542 %2 = load i32* %1, align 4
543 %3 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %0
544 store i32 %2, i32* %3, align 4
545 ret void
546}
547
548define void @off04(i64 %i) nounwind {
549entry:
550 %.sum = add i64 %i, 16
551 %0 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %.sum
552 store i32* %0, i32** @dptr, align 8
553 ret void
554}
555
556define void @off05(i64 %i) nounwind {
557entry:
558 %0 = load i32** @dptr, align 8
559 %1 = add i64 %i, 16
560 %2 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %1
561 %3 = load i32* %2, align 4
562 %4 = getelementptr i32* %0, i64 %1
563 store i32 %3, i32* %4, align 4
564 ret void
565}
566
567define void @off06(i64 %i) nounwind {
568entry:
569 %0 = add i64 %i, 16
570 %1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %0
571 %2 = load i32* %1, align 4
572 %3 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %0
573 store i32 %2, i32* %3, align 4
574 ret void
575}
576
577define void @off07(i64 %i) nounwind {
578entry:
579 %.sum = add i64 %i, 16
580 %0 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %.sum
581 store i32* %0, i32** @lptr, align 8
582 ret void
583}
584
585define void @off08(i64 %i) nounwind {
586entry:
587 %0 = load i32** @lptr, align 8
588 %1 = add i64 %i, 16
589 %2 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %1
590 %3 = load i32* %2, align 4
591 %4 = getelementptr i32* %0, i64 %1
592 store i32 %3, i32* %4, align 4
593 ret void
594}
595
596define void @moo00(i64 %i) nounwind {
597entry:
598 %0 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 65536), align 4
599 store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 65536), align 4
600 ret void
601}
602
603define void @moo01(i64 %i) nounwind {
604entry:
605 store i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 65536), i32** @ptr, align 8
606 ret void
607}
608
609define void @moo02(i64 %i) nounwind {
610entry:
611 %0 = load i32** @ptr, align 8
612 %1 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 65536), align 4
613 %2 = getelementptr i32* %0, i64 65536
614 store i32 %1, i32* %2, align 4
615 ret void
616}
617
618define void @moo03(i64 %i) nounwind {
619entry:
620 %0 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 65536), align 32
621 store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 65536), align 32
622 ret void
623}
624
625define void @moo04(i64 %i) nounwind {
626entry:
627 store i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 65536), i32** @dptr, align 8
628 ret void
629}
630
631define void @moo05(i64 %i) nounwind {
632entry:
633 %0 = load i32** @dptr, align 8
634 %1 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 65536), align 32
635 %2 = getelementptr i32* %0, i64 65536
636 store i32 %1, i32* %2, align 4
637 ret void
638}
639
640define void @moo06(i64 %i) nounwind {
641entry:
642 %0 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 65536), align 4
643 store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 65536), align 4
644 ret void
645}
646
647define void @moo07(i64 %i) nounwind {
648entry:
649 store i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 65536), i32** @lptr, align 8
650 ret void
651}
652
653define void @moo08(i64 %i) nounwind {
654entry:
655 %0 = load i32** @lptr, align 8
656 %1 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 65536), align 4
657 %2 = getelementptr i32* %0, i64 65536
658 store i32 %1, i32* %2, align 4
659 ret void
660}
661
662define void @big00(i64 %i) nounwind {
663entry:
664 %0 = add i64 %i, 65536
665 %1 = getelementptr [131072 x i32]* @src, i64 0, i64 %0
666 %2 = load i32* %1, align 4
667 %3 = getelementptr [131072 x i32]* @dst, i64 0, i64 %0
668 store i32 %2, i32* %3, align 4
669 ret void
670}
671
672define void @big01(i64 %i) nounwind {
673entry:
674 %.sum = add i64 %i, 65536
675 %0 = getelementptr [131072 x i32]* @dst, i64 0, i64 %.sum
676 store i32* %0, i32** @ptr, align 8
677 ret void
678}
679
680define void @big02(i64 %i) nounwind {
681entry:
682 %0 = load i32** @ptr, align 8
683 %1 = add i64 %i, 65536
684 %2 = getelementptr [131072 x i32]* @src, i64 0, i64 %1
685 %3 = load i32* %2, align 4
686 %4 = getelementptr i32* %0, i64 %1
687 store i32 %3, i32* %4, align 4
688 ret void
689}
690
691define void @big03(i64 %i) nounwind {
692entry:
693 %0 = add i64 %i, 65536
694 %1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %0
695 %2 = load i32* %1, align 4
696 %3 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %0
697 store i32 %2, i32* %3, align 4
698 ret void
699}
700
701define void @big04(i64 %i) nounwind {
702entry:
703 %.sum = add i64 %i, 65536
704 %0 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %.sum
705 store i32* %0, i32** @dptr, align 8
706 ret void
707}
708
709define void @big05(i64 %i) nounwind {
710entry:
711 %0 = load i32** @dptr, align 8
712 %1 = add i64 %i, 65536
713 %2 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %1
714 %3 = load i32* %2, align 4
715 %4 = getelementptr i32* %0, i64 %1
716 store i32 %3, i32* %4, align 4
717 ret void
718}
719
720define void @big06(i64 %i) nounwind {
721entry:
722 %0 = add i64 %i, 65536
723 %1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %0
724 %2 = load i32* %1, align 4
725 %3 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %0
726 store i32 %2, i32* %3, align 4
727 ret void
728}
729
730define void @big07(i64 %i) nounwind {
731entry:
732 %.sum = add i64 %i, 65536
733 %0 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %.sum
734 store i32* %0, i32** @lptr, align 8
735 ret void
736}
737
738define void @big08(i64 %i) nounwind {
739entry:
740 %0 = load i32** @lptr, align 8
741 %1 = add i64 %i, 65536
742 %2 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %1
743 %3 = load i32* %2, align 4
744 %4 = getelementptr i32* %0, i64 %1
745 store i32 %3, i32* %4, align 4
746 ret void
747}
748
749define i8* @bar00() nounwind {
750entry:
751 ret i8* bitcast ([131072 x i32]* @src to i8*)
752}
753
754define i8* @bxr00() nounwind {
755entry:
756 ret i8* bitcast ([32 x i32]* @xsrc to i8*)
757}
758
759define i8* @bar01() nounwind {
760entry:
761 ret i8* bitcast ([131072 x i32]* @dst to i8*)
762}
763
764define i8* @bxr01() nounwind {
765entry:
766 ret i8* bitcast ([32 x i32]* @xdst to i8*)
767}
768
769define i8* @bar02() nounwind {
770entry:
771 ret i8* bitcast (i32** @ptr to i8*)
772}
773
774define i8* @bar03() nounwind {
775entry:
776 ret i8* bitcast ([131072 x i32]* @dsrc to i8*)
777}
778
779define i8* @bar04() nounwind {
780entry:
781 ret i8* bitcast ([131072 x i32]* @ddst to i8*)
782}
783
784define i8* @bar05() nounwind {
785entry:
786 ret i8* bitcast (i32** @dptr to i8*)
787}
788
789define i8* @bar06() nounwind {
790entry:
791 ret i8* bitcast ([131072 x i32]* @lsrc to i8*)
792}
793
794define i8* @bar07() nounwind {
795entry:
796 ret i8* bitcast ([131072 x i32]* @ldst to i8*)
797}
798
799define i8* @bar08() nounwind {
800entry:
801 ret i8* bitcast (i32** @lptr to i8*)
802}
803
804define i8* @har00() nounwind {
805entry:
806 ret i8* bitcast ([131072 x i32]* @src to i8*)
807}
808
809define i8* @hxr00() nounwind {
810entry:
811 ret i8* bitcast ([32 x i32]* @xsrc to i8*)
812}
813
814define i8* @har01() nounwind {
815entry:
816 ret i8* bitcast ([131072 x i32]* @dst to i8*)
817}
818
819define i8* @hxr01() nounwind {
820entry:
821 ret i8* bitcast ([32 x i32]* @xdst to i8*)
822}
823
824define i8* @har02() nounwind {
825entry:
826 %0 = load i32** @ptr, align 8
827 %1 = bitcast i32* %0 to i8*
828 ret i8* %1
829}
830
831define i8* @har03() nounwind {
832entry:
833 ret i8* bitcast ([131072 x i32]* @dsrc to i8*)
834}
835
836define i8* @har04() nounwind {
837entry:
838 ret i8* bitcast ([131072 x i32]* @ddst to i8*)
839}
840
841define i8* @har05() nounwind {
842entry:
843 %0 = load i32** @dptr, align 8
844 %1 = bitcast i32* %0 to i8*
845 ret i8* %1
846}
847
848define i8* @har06() nounwind {
849entry:
850 ret i8* bitcast ([131072 x i32]* @lsrc to i8*)
851}
852
853define i8* @har07() nounwind {
854entry:
855 ret i8* bitcast ([131072 x i32]* @ldst to i8*)
856}
857
858define i8* @har08() nounwind {
859entry:
860 %0 = load i32** @lptr, align 8
861 %1 = bitcast i32* %0 to i8*
862 ret i8* %1
863}
864
865define i8* @bat00() nounwind {
866entry:
867 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @src, i32 0, i64 16) to i8*)
868}
869
870define i8* @bxt00() nounwind {
871entry:
872 ret i8* bitcast (i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 16) to i8*)
873}
874
875define i8* @bat01() nounwind {
876entry:
877 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16) to i8*)
878}
879
880define i8* @bxt01() nounwind {
881entry:
882 ret i8* bitcast (i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16) to i8*)
883}
884
885define i8* @bat02() nounwind {
886entry:
887 %0 = load i32** @ptr, align 8
888 %1 = getelementptr i32* %0, i64 16
889 %2 = bitcast i32* %1 to i8*
890 ret i8* %2
891}
892
893define i8* @bat03() nounwind {
894entry:
895 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 16) to i8*)
896}
897
898define i8* @bat04() nounwind {
899entry:
900 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16) to i8*)
901}
902
903define i8* @bat05() nounwind {
904entry:
905 %0 = load i32** @dptr, align 8
906 %1 = getelementptr i32* %0, i64 16
907 %2 = bitcast i32* %1 to i8*
908 ret i8* %2
909}
910
911define i8* @bat06() nounwind {
912entry:
913 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 16) to i8*)
914}
915
916define i8* @bat07() nounwind {
917entry:
918 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16) to i8*)
919}
920
921define i8* @bat08() nounwind {
922entry:
923 %0 = load i32** @lptr, align 8
924 %1 = getelementptr i32* %0, i64 16
925 %2 = bitcast i32* %1 to i8*
926 ret i8* %2
927}
928
929define i8* @bam00() nounwind {
930entry:
931 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @src, i32 0, i64 65536) to i8*)
932}
933
934define i8* @bam01() nounwind {
935entry:
936 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 65536) to i8*)
937}
938
939define i8* @bxm01() nounwind {
940entry:
941 ret i8* bitcast (i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 65536) to i8*)
942}
943
944define i8* @bam02() nounwind {
945entry:
946 %0 = load i32** @ptr, align 8
947 %1 = getelementptr i32* %0, i64 65536
948 %2 = bitcast i32* %1 to i8*
949 ret i8* %2
950}
951
952define i8* @bam03() nounwind {
953entry:
954 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 65536) to i8*)
955}
956
957define i8* @bam04() nounwind {
958entry:
959 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 65536) to i8*)
960}
961
962define i8* @bam05() nounwind {
963entry:
964 %0 = load i32** @dptr, align 8
965 %1 = getelementptr i32* %0, i64 65536
966 %2 = bitcast i32* %1 to i8*
967 ret i8* %2
968}
969
970define i8* @bam06() nounwind {
971entry:
972 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 65536) to i8*)
973}
974
975define i8* @bam07() nounwind {
976entry:
977 ret i8* bitcast (i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 65536) to i8*)
978}
979
980define i8* @bam08() nounwind {
981entry:
982 %0 = load i32** @lptr, align 8
983 %1 = getelementptr i32* %0, i64 65536
984 %2 = bitcast i32* %1 to i8*
985 ret i8* %2
986}
987
988define i8* @cat00(i64 %i) nounwind {
989entry:
990 %0 = add i64 %i, 16
991 %1 = getelementptr [131072 x i32]* @src, i64 0, i64 %0
992 %2 = bitcast i32* %1 to i8*
993 ret i8* %2
994}
995
996define i8* @cxt00(i64 %i) nounwind {
997entry:
998 %0 = add i64 %i, 16
999 %1 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %0
1000 %2 = bitcast i32* %1 to i8*
1001 ret i8* %2
1002}
1003
1004define i8* @cat01(i64 %i) nounwind {
1005entry:
1006 %0 = add i64 %i, 16
1007 %1 = getelementptr [131072 x i32]* @dst, i64 0, i64 %0
1008 %2 = bitcast i32* %1 to i8*
1009 ret i8* %2
1010}
1011
1012define i8* @cxt01(i64 %i) nounwind {
1013entry:
1014 %0 = add i64 %i, 16
1015 %1 = getelementptr [32 x i32]* @xdst, i64 0, i64 %0
1016 %2 = bitcast i32* %1 to i8*
1017 ret i8* %2
1018}
1019
1020define i8* @cat02(i64 %i) nounwind {
1021entry:
1022 %0 = load i32** @ptr, align 8
1023 %1 = add i64 %i, 16
1024 %2 = getelementptr i32* %0, i64 %1
1025 %3 = bitcast i32* %2 to i8*
1026 ret i8* %3
1027}
1028
1029define i8* @cat03(i64 %i) nounwind {
1030entry:
1031 %0 = add i64 %i, 16
1032 %1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %0
1033 %2 = bitcast i32* %1 to i8*
1034 ret i8* %2
1035}
1036
1037define i8* @cat04(i64 %i) nounwind {
1038entry:
1039 %0 = add i64 %i, 16
1040 %1 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %0
1041 %2 = bitcast i32* %1 to i8*
1042 ret i8* %2
1043}
1044
1045define i8* @cat05(i64 %i) nounwind {
1046entry:
1047 %0 = load i32** @dptr, align 8
1048 %1 = add i64 %i, 16
1049 %2 = getelementptr i32* %0, i64 %1
1050 %3 = bitcast i32* %2 to i8*
1051 ret i8* %3
1052}
1053
1054define i8* @cat06(i64 %i) nounwind {
1055entry:
1056 %0 = add i64 %i, 16
1057 %1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %0
1058 %2 = bitcast i32* %1 to i8*
1059 ret i8* %2
1060}
1061
1062define i8* @cat07(i64 %i) nounwind {
1063entry:
1064 %0 = add i64 %i, 16
1065 %1 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %0
1066 %2 = bitcast i32* %1 to i8*
1067 ret i8* %2
1068}
1069
1070define i8* @cat08(i64 %i) nounwind {
1071entry:
1072 %0 = load i32** @lptr, align 8
1073 %1 = add i64 %i, 16
1074 %2 = getelementptr i32* %0, i64 %1
1075 %3 = bitcast i32* %2 to i8*
1076 ret i8* %3
1077}
1078
1079define i8* @cam00(i64 %i) nounwind {
1080entry:
1081 %0 = add i64 %i, 65536
1082 %1 = getelementptr [131072 x i32]* @src, i64 0, i64 %0
1083 %2 = bitcast i32* %1 to i8*
1084 ret i8* %2
1085}
1086
1087define i8* @cxm00(i64 %i) nounwind {
1088entry:
1089 %0 = add i64 %i, 65536
1090 %1 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %0
1091 %2 = bitcast i32* %1 to i8*
1092 ret i8* %2
1093}
1094
1095define i8* @cam01(i64 %i) nounwind {
1096entry:
1097 %0 = add i64 %i, 65536
1098 %1 = getelementptr [131072 x i32]* @dst, i64 0, i64 %0
1099 %2 = bitcast i32* %1 to i8*
1100 ret i8* %2
1101}
1102
1103define i8* @cxm01(i64 %i) nounwind {
1104entry:
1105 %0 = add i64 %i, 65536
1106 %1 = getelementptr [32 x i32]* @xdst, i64 0, i64 %0
1107 %2 = bitcast i32* %1 to i8*
1108 ret i8* %2
1109}
1110
1111define i8* @cam02(i64 %i) nounwind {
1112entry:
1113 %0 = load i32** @ptr, align 8
1114 %1 = add i64 %i, 65536
1115 %2 = getelementptr i32* %0, i64 %1
1116 %3 = bitcast i32* %2 to i8*
1117 ret i8* %3
1118}
1119
1120define i8* @cam03(i64 %i) nounwind {
1121entry:
1122 %0 = add i64 %i, 65536
1123 %1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %0
1124 %2 = bitcast i32* %1 to i8*
1125 ret i8* %2
1126}
1127
1128define i8* @cam04(i64 %i) nounwind {
1129entry:
1130 %0 = add i64 %i, 65536
1131 %1 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %0
1132 %2 = bitcast i32* %1 to i8*
1133 ret i8* %2
1134}
1135
1136define i8* @cam05(i64 %i) nounwind {
1137entry:
1138 %0 = load i32** @dptr, align 8
1139 %1 = add i64 %i, 65536
1140 %2 = getelementptr i32* %0, i64 %1
1141 %3 = bitcast i32* %2 to i8*
1142 ret i8* %3
1143}
1144
1145define i8* @cam06(i64 %i) nounwind {
1146entry:
1147 %0 = add i64 %i, 65536
1148 %1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %0
1149 %2 = bitcast i32* %1 to i8*
1150 ret i8* %2
1151}
1152
1153define i8* @cam07(i64 %i) nounwind {
1154entry:
1155 %0 = add i64 %i, 65536
1156 %1 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %0
1157 %2 = bitcast i32* %1 to i8*
1158 ret i8* %2
1159}
1160
1161define i8* @cam08(i64 %i) nounwind {
1162entry:
1163 %0 = load i32** @lptr, align 8
1164 %1 = add i64 %i, 65536
1165 %2 = getelementptr i32* %0, i64 %1
1166 %3 = bitcast i32* %2 to i8*
1167 ret i8* %3
1168}
1169
1170define void @lcallee() nounwind {
1171entry:
1172 tail call void @x() nounwind
1173 tail call void @x() nounwind
1174 tail call void @x() nounwind
1175 tail call void @x() nounwind
1176 tail call void @x() nounwind
1177 tail call void @x() nounwind
1178 tail call void @x() nounwind
1179 ret void
1180}
1181
1182declare void @x()
1183
1184define internal void @dcallee() nounwind {
1185entry:
1186 tail call void @y() nounwind
1187 tail call void @y() nounwind
1188 tail call void @y() nounwind
1189 tail call void @y() nounwind
1190 tail call void @y() nounwind
1191 tail call void @y() nounwind
1192 tail call void @y() nounwind
1193 ret void
1194}
1195
1196declare void @y()
1197
1198define void ()* @address() nounwind {
1199entry:
1200 ret void ()* @callee
1201}
1202
1203declare void @callee()
1204
1205define void ()* @laddress() nounwind {
1206entry:
1207 ret void ()* @lcallee
1208}
1209
1210define void ()* @daddress() nounwind {
1211entry:
1212 ret void ()* @dcallee
1213}
1214
1215define void @caller() nounwind {
1216entry:
1217 tail call void @callee() nounwind
1218 tail call void @callee() nounwind
1219 ret void
1220}
1221
1222define void @dcaller() nounwind {
1223entry:
1224 tail call void @dcallee() nounwind
1225 tail call void @dcallee() nounwind
1226 ret void
1227}
1228
1229define void @lcaller() nounwind {
1230entry:
1231 tail call void @lcallee() nounwind
1232 tail call void @lcallee() nounwind
1233 ret void
1234}
1235
1236define void @tailcaller() nounwind {
1237entry:
1238 tail call void @callee() nounwind
1239 ret void
1240}
1241
1242define void @dtailcaller() nounwind {
1243entry:
1244 tail call void @dcallee() nounwind
1245 ret void
1246}
1247
1248define void @ltailcaller() nounwind {
1249entry:
1250 tail call void @lcallee() nounwind
1251 ret void
1252}
1253
1254define void @icaller() nounwind {
1255entry:
1256 %0 = load void ()** @ifunc, align 8
1257 tail call void %0() nounwind
1258 %1 = load void ()** @ifunc, align 8
1259 tail call void %1() nounwind
1260 ret void
1261}
1262
1263define void @dicaller() nounwind {
1264entry:
1265 %0 = load void ()** @difunc, align 8
1266 tail call void %0() nounwind
1267 %1 = load void ()** @difunc, align 8
1268 tail call void %1() nounwind
1269 ret void
1270}
1271
1272define void @licaller() nounwind {
1273entry:
1274 %0 = load void ()** @lifunc, align 8
1275 tail call void %0() nounwind
1276 %1 = load void ()** @lifunc, align 8
1277 tail call void %1() nounwind
1278 ret void
1279}
1280
1281define void @itailcaller() nounwind {
1282entry:
1283 %0 = load void ()** @ifunc, align 8
1284 tail call void %0() nounwind
1285 %1 = load void ()** @ifunc, align 8
1286 tail call void %1() nounwind
1287 ret void
1288}
1289
1290define void @ditailcaller() nounwind {
1291entry:
1292 %0 = load void ()** @difunc, align 8
1293 tail call void %0() nounwind
1294 ret void
1295}
1296
1297define void @litailcaller() nounwind {
1298entry:
1299 %0 = load void ()** @lifunc, align 8
1300 tail call void %0() nounwind
1301 ret void
1302}