1 ; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 @.str = private unnamed_addr constant [6 x i8] c"a=%d\0A\00", align 1
4 @.str.1 = private unnamed_addr constant [6 x i8] c"b=%d\0A\00", align 1
5 @.str.2 = private unnamed_addr constant [6 x i8] c"c=%d\0A\00", align 1
6 @.str.3 = private unnamed_addr constant [6 x i8] c"d=%u\0A\00", align 1
7 @.str.4 = private unnamed_addr constant [6 x i8] c"e=%u\0A\00", align 1
8 @.str.5 = private unnamed_addr constant [6 x i8] c"f=%u\0A\00", align 1
9 @.str.6 = private unnamed_addr constant [6 x i8] c"g=%f\0A\00", align 1
10 @.str.7 = private unnamed_addr constant [6 x i8] c"h=%p\0A\00", align 1
11 @.str.8 = private unnamed_addr constant [7 x i8] c"i=%ld\0A\00", align 1
12 @.str.9 = private unnamed_addr constant [7 x i8] c"j=%lf\0A\00", align 1
13 @.str.10 = private unnamed_addr constant [7 x i8] c"j=%Lf\0A\00", align 1
15 define i32 @func_vainout(i32, ...) {
16 ; CHECK-LABEL: func_vainout:
17 ; CHECK: ldl.sx %s1, 184(, %s9)
18 ; CHECK: ld2b.sx %s19, 192(, %s9)
19 ; CHECK: ld1b.sx %s22, 200(, %s9)
20 ; CHECK: ldl.sx %s23, 208(, %s9)
21 ; CHECK: ld2b.zx %s24, 216(, %s9)
22 ; CHECK: ld1b.zx %s25, 224(, %s9)
23 ; CHECK: ldu %s26, 236(, %s9)
24 ; CHECK: ld %s27, 240(, %s9)
25 ; CHECK: ld %s28, 248(, %s9)
26 ; CHECK: ld %s29, 256(, %s9)
27 ; CHECK: lea %s0, 279(, %s9)
28 ; CHECK: and %s0, -16, %s0
29 ; CHECK: lea %s2, 16(, %s0)
30 ; CHECK: ld %s20, 8(, %s0)
31 ; CHECK: ld %s21, (, %s0)
32 ; CHECK: ld %s18, 16(, %s0)
34 %a = alloca i8*, align 8
35 %a8 = bitcast i8** %a to i8*
36 call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %a8)
37 call void @llvm.va_start(i8* nonnull %a8)
38 %p0 = va_arg i8** %a, i32
39 %p1 = va_arg i8** %a, i16
40 %p2 = va_arg i8** %a, i8
41 %p3 = va_arg i8** %a, i32
42 %p4 = va_arg i8** %a, i16
43 %p5 = va_arg i8** %a, i8
44 %p6 = va_arg i8** %a, float
45 %p7 = va_arg i8** %a, i8*
46 %p8 = va_arg i8** %a, i64
47 %p9 = va_arg i8** %a, double
48 %p10 = va_arg i8** %a, fp128
49 %p11 = va_arg i8** %a, double
50 call void @llvm.va_end(i8* nonnull %a8)
51 call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %a8)
52 %pf0 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %p0)
53 %p1.s32 = sext i16 %p1 to i32
54 %pf1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %p1.s32)
55 %p2.s32 = sext i8 %p2 to i32
56 %pf2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %p2.s32)
57 %pf3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %p3)
58 %p4.z32 = zext i16 %p4 to i32
59 %pf4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %p4.z32)
60 %p5.z32 = zext i8 %p5 to i32
61 %pf5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %p5.z32)
62 %pf6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), float %p6)
63 %pf7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %p7)
64 %pf8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i64 %p8)
65 %pf9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double %p9)
66 %pf10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), fp128 %p10)
67 %pf11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double %p11)
70 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
71 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
72 declare void @llvm.va_start(i8*)
73 declare void @llvm.va_end(i8*)
74 declare i32 @printf(i8* nocapture readonly, ...)