1 ; RUN: llc < %s -mtriple=avr | FileCheck %s
3 declare void @ret_void_args_i8(i8 %a)
4 declare void @ret_void_args_i8_i32(i8 %a, i32 %b)
5 declare void @ret_void_args_i8_i8_i8_i8(i8 %a, i8 %b, i8 %c, i8 %d)
6 declare void @ret_void_args_i32_i16_i8(i32 %a, i16 %b, i8 %c)
7 declare void @ret_void_args_i64(i64 %a)
8 declare void @ret_void_args_i64_i64(i64 %a, i64 %b)
9 declare void @ret_void_args_i64_i64_i16(i64 %a, i64 %b, i16 %c)
11 ; CHECK-LABEL: call_void_args_i8
12 define void @call_void_args_i8() {
14 call void @ret_void_args_i8 (i8 64)
18 ; CHECK-LABEL: call_void_args_i8_i32
19 define void @call_void_args_i8_i32() {
21 ; CHECK-NEXT: ldi r21, 3
22 ; CHECK-NEXT: ldi r22, 2
23 ; CHECK-NEXT: ldi r23, 1
24 ; CHECK-NEXT: ldi r24, 64
25 call void @ret_void_args_i8_i32 (i8 64, i32 16909060)
29 ; CHECK-LABEL: call_void_args_i8_i8_i8_i8
30 define void @call_void_args_i8_i8_i8_i8() {
32 ; CHECK-NEXT: ldi r22, 2
33 ; CHECK-NEXT: ldi r20, 3
34 ; CHECK-NEXT: ldi r18, 4
35 call void @ret_void_args_i8_i8_i8_i8(i8 1, i8 2, i8 3, i8 4)
39 ; CHECK-LABEL: call_void_args_i32_i16_i8
40 define void @call_void_args_i32_i16_i8() {
42 ; CHECK-NEXT: ldi r23, 3
43 ; CHECK-NEXT: ldi r24, 2
44 ; CHECK-NEXT: ldi r25, 1
45 ; CHECK-NEXT: ldi r20, 1
46 ; CHECK-NEXT: ldi r21, 4
47 ; CHECK-NEXT: ldi r18, 64
48 call void @ret_void_args_i32_i16_i8(i32 16909060, i16 1025, i8 64)
52 ; CHECK-LABEL: call_void_args_i64
53 define void @call_void_args_i64() {
55 ; CHECK-NEXT: ldi r19, 7
56 ; CHECK-NEXT: ldi r20, 6
57 ; CHECK-NEXT: ldi r21, 5
58 ; CHECK-NEXT: ldi r22, 4
59 ; CHECK-NEXT: ldi r23, 3
60 ; CHECK-NEXT: ldi r24, 2
61 ; CHECK-NEXT: ldi r25, 1
62 call void @ret_void_args_i64(i64 72623859790382856)
66 ; CHECK-LABEL: call_void_args_i64_i64
67 define void @call_void_args_i64_i64() {
69 ; CHECK-NEXT: ldi r19, 7
70 ; CHECK-NEXT: ldi r20, 6
71 ; CHECK-NEXT: ldi r21, 5
72 ; CHECK-NEXT: ldi r22, 4
73 ; CHECK-NEXT: ldi r23, 3
74 ; CHECK-NEXT: ldi r24, 2
75 ; CHECK-NEXT: ldi r25, 1
76 ; the second arg is in r10:r17, but unordered
79 call void @ret_void_args_i64_i64(i64 72623859790382856, i64 651345242494996224)
83 ; CHECK-LABEL: call_void_args_i64_i64_i16
84 define void @call_void_args_i64_i64_i16() {
87 call void @ret_void_args_i64_i64_i16(i64 72623859790382856, i64 651345242494996224, i16 5655)