1 ; RUN: llc < %s -march=avr | FileCheck %s
3 ; CHECK-LABEL: ret_void_args_i8
4 define void @ret_void_args_i8(i8 %a) {
6 store volatile i8 %a, i8* inttoptr (i64 4 to i8*)
10 ; CHECK-LABEL: ret_void_args_i8_i32
11 define void @ret_void_args_i8_i32(i8 %a, i32 %b) {
13 store volatile i8 %a, i8* inttoptr (i64 4 to i8*)
15 ; CHECK-NEXT: sts 8, r23
16 ; CHECK-NEXT: sts 7, r22
17 ; CHECK-NEXT: sts 6, r21
18 ; CHECK-NEXT: sts 5, r20
19 store volatile i32 %b, i32* inttoptr (i64 5 to i32*)
23 ; CHECK-LABEL: ret_void_args_i8_i8_i8_i8
24 define void @ret_void_args_i8_i8_i8_i8(i8 %a, i8 %b, i8 %c, i8 %d) {
26 store volatile i8 %a, i8* inttoptr (i64 4 to i8*)
27 ; CHECK-NEXT: sts 5, r22
28 store volatile i8 %b, i8* inttoptr (i64 5 to i8*)
29 ; CHECK-NEXT: sts 6, r20
30 store volatile i8 %c, i8* inttoptr (i64 6 to i8*)
31 ; CHECK-NEXT: sts 7, r18
32 store volatile i8 %d, i8* inttoptr (i64 7 to i8*)
36 ; CHECK-LABEL: ret_void_args_i32_16_i8
37 define void @ret_void_args_i32_16_i8(i32 %a, i16 %b, i8 %c) {
39 ; CHECK-NEXT: sts 6, r24
40 ; CHECK-NEXT: sts 5, r23
41 ; CHECK-NEXT: sts 4, r22
42 store volatile i32 %a, i32* inttoptr (i64 4 to i32*)
44 ; CHECK-NEXT: sts 5, r21
45 ; CHECK-NEXT: sts 4, r20
46 store volatile i16 %b, i16* inttoptr (i64 4 to i16*)
48 ; CHECK-NEXT: sts 4, r18
49 store volatile i8 %c, i8* inttoptr (i64 4 to i8*)
53 ; CHECK-LABEL: ret_void_args_i64
54 define void @ret_void_args_i64(i64 %a) {
56 ; CHECK-NEXT: sts 10, r24
57 ; CHECK-NEXT: sts 9, r23
58 ; CHECK-NEXT: sts 8, r22
59 ; CHECK-NEXT: sts 7, r21
60 ; CHECK-NEXT: sts 6, r20
61 ; CHECK-NEXT: sts 5, r19
62 ; CHECK-NEXT: sts 4, r18
63 store volatile i64 %a, i64* inttoptr (i64 4 to i64*)
67 ; CHECK-LABEL: ret_void_args_i64_i64
68 define void @ret_void_args_i64_i64(i64 %a, i64 %b) {
69 ; CHECK-DAG: sts 11, r25
70 ; CHECK-DAG: sts 10, r24
71 ; CHECK-DAG: sts 9, r23
72 ; CHECK-DAG: sts 8, r22
73 ; CHECK-DAG: sts 7, r21
74 ; CHECK-DAG: sts 6, r20
75 ; CHECK-DAG: sts 5, r19
76 ; CHECK-DAG: sts 4, r18
77 store volatile i64 %a, i64* inttoptr (i64 4 to i64*)
79 ; CHECK-DAG: sts 11, r17
80 ; CHECK-DAG: sts 10, r16
81 ; CHECK-DAG: sts 9, r15
82 ; CHECK-DAG: sts 8, r14
83 ; CHECK-DAG: sts 7, r13
84 ; CHECK-DAG: sts 6, r12
85 ; CHECK-DAG: sts 5, r11
86 ; CHECK-DAG: sts 4, r10
87 store volatile i64 %b, i64* inttoptr (i64 4 to i64*)
91 ; This is exactly enough to hit the limit of what can be passed
92 ; completely in registers.
93 ; CHECK-LABEL: ret_void_args_i64_i64_i16
94 define void @ret_void_args_i64_i64_i16(i64 %a, i64 %b, i16 %c) {
96 ; CHECK-NEXT: sts 4, r8
97 store volatile i16 %c, i16* inttoptr (i64 4 to i16*)