1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=X64
2 ; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck %s -check-prefix=WIN64
4 @.str = private unnamed_addr constant [5 x i8] c"%ld\0A\00"
5 @sel = external global ptr
6 @sel3 = external global ptr
7 @sel4 = external global ptr
8 @sel5 = external global ptr
9 @sel6 = external global ptr
10 @sel7 = external global ptr
16 define void @foo(i64 %arg) nounwind optsize ssp noredzone {
18 %call = tail call i32 (ptr, ...) @printf(ptr @.str, i64 %arg) nounwind optsize noredzone
22 declare i32 @printf(ptr, ...) optsize noredzone
28 define void @bar(i64 %arg) nounwind optsize ssp noredzone {
30 tail call void @bar2(ptr @.str, i64 %arg) nounwind optsize noredzone
34 declare void @bar2(ptr, i64) optsize noredzone
40 define ptr @foo2(ptr %arg) nounwind optsize ssp noredzone {
42 %tmp1 = load ptr, ptr @sel, align 8
43 %call = tail call ptr (ptr, ptr, ...) @x2(ptr %arg, ptr %tmp1) nounwind optsize noredzone
47 declare ptr @x2(ptr, ptr, ...) optsize noredzone
53 define ptr @foo6(ptr %arg1, ptr %arg2) nounwind optsize ssp noredzone {
55 %tmp2 = load ptr, ptr @sel3, align 8
56 %tmp3 = load ptr, ptr @sel4, align 8
57 %tmp4 = load ptr, ptr @sel5, align 8
58 %tmp5 = load ptr, ptr @sel6, align 8
59 %call = tail call ptr (ptr, ptr, ptr, ...) @x3(ptr %arg1, ptr %arg2, ptr %tmp2, ptr %tmp3, ptr %tmp4, ptr %tmp5) nounwind optsize noredzone
63 declare ptr @x3(ptr, ptr, ptr, ...) optsize noredzone
69 define ptr @foo7(ptr %arg1, ptr %arg2) nounwind optsize ssp noredzone {
71 %tmp2 = load ptr, ptr @sel3, align 8
72 %tmp3 = load ptr, ptr @sel4, align 8
73 %tmp4 = load ptr, ptr @sel5, align 8
74 %tmp5 = load ptr, ptr @sel6, align 8
75 %tmp6 = load ptr, ptr @sel7, align 8
76 %call = tail call ptr (ptr, ptr, ptr, ptr, ptr, ptr, ptr, ...) @x7(ptr %arg1, ptr %arg2, ptr %tmp2, ptr %tmp3, ptr %tmp4, ptr %tmp5, ptr %tmp6) nounwind optsize noredzone
80 declare ptr @x7(ptr, ptr, ptr, ptr, ptr, ptr, ptr, ...) optsize noredzone
86 define ptr @foo8(ptr %arg1, ptr %arg2) nounwind optsize ssp noredzone {
88 %tmp2 = load ptr, ptr @sel3, align 8
89 %tmp3 = load ptr, ptr @sel4, align 8
90 %tmp4 = load ptr, ptr @sel5, align 8
91 %tmp5 = load ptr, ptr @sel6, align 8
92 %call = tail call ptr (ptr, ptr, ptr, ...) @x3(ptr %arg1, ptr %arg2, ptr %tmp2, ptr %tmp3, ptr %tmp4, ptr %tmp5, i32 48879, i32 48879) nounwind optsize noredzone