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 i8*
6 @sel3 = external global i8*
7 @sel4 = external global i8*
8 @sel5 = external global i8*
9 @sel6 = external global i8*
10 @sel7 = external global i8*
16 define void @foo(i64 %arg) nounwind optsize ssp noredzone {
18 %call = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %arg) nounwind optsize noredzone
22 declare i32 @printf(i8*, ...) optsize noredzone
28 define void @bar(i64 %arg) nounwind optsize ssp noredzone {
30 tail call void @bar2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %arg) nounwind optsize noredzone
34 declare void @bar2(i8*, i64) optsize noredzone
40 define i8* @foo2(i8* %arg) nounwind optsize ssp noredzone {
42 %tmp1 = load i8*, i8** @sel, align 8
43 %call = tail call i8* (i8*, i8*, ...) @x2(i8* %arg, i8* %tmp1) nounwind optsize noredzone
47 declare i8* @x2(i8*, i8*, ...) optsize noredzone
53 define i8* @foo6(i8* %arg1, i8* %arg2) nounwind optsize ssp noredzone {
55 %tmp2 = load i8*, i8** @sel3, align 8
56 %tmp3 = load i8*, i8** @sel4, align 8
57 %tmp4 = load i8*, i8** @sel5, align 8
58 %tmp5 = load i8*, i8** @sel6, align 8
59 %call = tail call i8* (i8*, i8*, i8*, ...) @x3(i8* %arg1, i8* %arg2, i8* %tmp2, i8* %tmp3, i8* %tmp4, i8* %tmp5) nounwind optsize noredzone
63 declare i8* @x3(i8*, i8*, i8*, ...) optsize noredzone
69 define i8* @foo7(i8* %arg1, i8* %arg2) nounwind optsize ssp noredzone {
71 %tmp2 = load i8*, i8** @sel3, align 8
72 %tmp3 = load i8*, i8** @sel4, align 8
73 %tmp4 = load i8*, i8** @sel5, align 8
74 %tmp5 = load i8*, i8** @sel6, align 8
75 %tmp6 = load i8*, i8** @sel7, align 8
76 %call = tail call i8* (i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) @x7(i8* %arg1, i8* %arg2, i8* %tmp2, i8* %tmp3, i8* %tmp4, i8* %tmp5, i8* %tmp6) nounwind optsize noredzone
80 declare i8* @x7(i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) optsize noredzone
86 define i8* @foo8(i8* %arg1, i8* %arg2) nounwind optsize ssp noredzone {
88 %tmp2 = load i8*, i8** @sel3, align 8
89 %tmp3 = load i8*, i8** @sel4, align 8
90 %tmp4 = load i8*, i8** @sel5, align 8
91 %tmp5 = load i8*, i8** @sel6, align 8
92 %call = tail call i8* (i8*, i8*, i8*, ...) @x3(i8* %arg1, i8* %arg2, i8* %tmp2, i8* %tmp3, i8* %tmp4, i8* %tmp5, i32 48879, i32 48879) nounwind optsize noredzone